No point of switching utf8 layers in all-latin tests
[catagits/Test-EOL.git] / t / 13-latin1.t
CommitLineData
a2bfe7c3 1use strict;
2use warnings;
3
4use Test::More tests => 2;
5use File::Temp qw( tempdir tempfile );
6
7use Config;
8$ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
9
10{
11 my $tmpdir = tempdir( CLEANUP => 1 );
12 my ($fh, $filename) = tempfile( DIR => $tmpdir, SUFFIX => '.pL' );
13 print $fh "\xE1\xF3 how na\xEFve";
14 close $fh;
15
16 my (undef, $outfile) = tempfile();
17
18 `$^X -MTest::EOL -e "all_perl_files_ok( '$tmpdir' )" >$outfile 2>&1`;
19 ok(! $? );
20
21 my $out = do { local (@ARGV, $/) = $outfile; <> };
22
23 is (
24 $out,
25 "ok 1 - No incorrect line endings in '$filename'\n1..1\n",
26 'no malformed unicode warnings',
27 );
28
29 unlink $outfile;
30}