Subject: | Test::EOL should not assume UTF-8 encoding on tested files |
When a tested file contains Latin-1 chars, Test::EOL issues warnings and
fails if trailing_whitespace option is turned on.
This should be resolved by removing the :utf8 from
binmode( $fh, ':raw:utf8' );
in line 107 (version 0.9).
The Windows test should not be affected by this change.
Attached test case (could easily be included in 11-all.t) provides
Latin-1 test that doesn't fail in version 0.7. And doesn't in current
version after making the described mini-change.
Tested on Perl 5.10.1, Debian and Windows (Strawberry Perl).
Subject: | 13-latin1.t |
use strict;
use Test::More tests => 1;
use Test::EOL;
use File::Temp 'tempfile';
my $file5 = make_file5();
eol_unix_ok( $file5, { trailing_whitespace => 1 });
unlink $file5;
sub make_file5 {
my ($fh, $filename) = tempfile();
print $fh <<'DUMMY';
#!/usr/bin/perl
print "Grüße!\n";
DUMMY
return $filename;
}