From 784c1bd85d606a15cc3c1bd825db06bd3bd41fe0 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 16 Mar 2021 21:37:50 +0100 Subject: 100-creates-a-french-attribution-config: Fix test for attribution_locale The file reading code I had previously was incorrect: it only read the first line of the file into `$generated_config` instead of the whole file. Fix the file reading code and add the new `$attribution_locale` config line. --- t/100-creates-a-french-attribution-config.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 't') diff --git a/t/100-creates-a-french-attribution-config.t b/t/100-creates-a-french-attribution-config.t index 65d2067..4caae1e 100644 --- a/t/100-creates-a-french-attribution-config.t +++ b/t/100-creates-a-french-attribution-config.t @@ -24,6 +24,7 @@ use Bin qw($BIN); my $attribution_muttrc_path = "$ENV{'HOME'}/.local/share/ottolangy/attribution.muttrc"; my $attribution_config = q(set attribution = "Le %{%e %b. %Y à %H:%M %Z}, %f a écrit:" +set attribution_locale = "fr_FR.UTF-8" ); # Remove any existing Ottolangy muttrc file. @@ -32,12 +33,11 @@ unlink $attribution_muttrc_path; system("$BIN < ./t/data/french.eml"); ok !$?; -my $generated_config; -{ - local $\; +my $generated_config = do { + local $/ = undef; open my $fh, '<', $attribution_muttrc_path or die $!; - $generated_config = <$fh>; -} + <$fh>; +}; is $generated_config, $attribution_config; -- cgit v1.2.3