diff options
author | Teddy Wing | 2021-03-16 21:37:50 +0100 |
---|---|---|
committer | Teddy Wing | 2021-03-16 21:37:50 +0100 |
commit | 784c1bd85d606a15cc3c1bd825db06bd3bd41fe0 (patch) | |
tree | fbf421425ff638996d662d4ddec974af6c2d6692 | |
parent | 1ce60591040cc7a8163cab04277b393ce87bc3c0 (diff) | |
download | mutt-ottolangy-784c1bd85d606a15cc3c1bd825db06bd3bd41fe0.tar.bz2 |
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.
-rw-r--r-- | t/100-creates-a-french-attribution-config.t | 10 |
1 files changed, 5 insertions, 5 deletions
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; |