From: Steve Hancock Date: Thu, 3 Mar 2022 19:08:52 +0000 (-0800) Subject: update test for future default change from -neos to -eos X-Git-Tag: 20220217.02~11 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=65bc81da4a431a6c14a129eb180dbb4866dda87a;p=perltidy.git update test for future default change from -neos to -eos --- diff --git a/t/testwide.t b/t/testwide.t index f194d0ed..4a8a1ce5 100755 --- a/t/testwide.t +++ b/t/testwide.t @@ -30,6 +30,8 @@ EOM my $output; +# The source is in character mode here, so perltidy will not decode. +# So here we do not need to set -eos or -neos Perl::Tidy::perltidy( source => \$source, destination => \$output, @@ -39,11 +41,15 @@ Perl::Tidy::perltidy( ok($output, $expected_output); +# Since default encoding is 'guess' and the source is a file of utf8, perltidy +# will guess utf8 and decode the input. But we are comparing to a string which +# is in character mode, so we do not want perltidy to encode the output in this +# case and therefore must set -neos. Perl::Tidy::perltidy( source => $FindBin::Bin . '/testwide.pl.src', destination => \$output, perltidyrc => \$perltidyrc, - argv => '-nsyn', + argv => '-nsyn -neos', ); ok($output, $expected_output);