X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F13-latin1.t;fp=t%2F13-latin1.t;h=62fd6c66ab9f7d5b9aeb2967391854cf702da939;hb=a2bfe7c3259a853708ab9ce6224d35b1a011fc31;hp=0000000000000000000000000000000000000000;hpb=939ef6135463a53256f555cf9bc6846c5d4c6b31;p=catagits%2FTest-EOL.git diff --git a/t/13-latin1.t b/t/13-latin1.t new file mode 100644 index 0000000..62fd6c6 --- /dev/null +++ b/t/13-latin1.t @@ -0,0 +1,30 @@ +use strict; +use warnings; + +use Test::More tests => 2; +use File::Temp qw( tempdir tempfile ); + +use Config; +$ENV{PERL5LIB} = join ($Config{path_sep}, @INC); + +{ + my $tmpdir = tempdir( CLEANUP => 1 ); + my ($fh, $filename) = tempfile( DIR => $tmpdir, SUFFIX => '.pL' ); + print $fh "\xE1\xF3 how na\xEFve"; + close $fh; + + my (undef, $outfile) = tempfile(); + + `$^X -MTest::EOL -e "all_perl_files_ok( '$tmpdir' )" >$outfile 2>&1`; + ok(! $? ); + + my $out = do { local (@ARGV, $/) = $outfile; <> }; + + is ( + $out, + "ok 1 - No incorrect line endings in '$filename'\n1..1\n", + 'no malformed unicode warnings', + ); + + unlink $outfile; +}