Commit | Line | Data |
a2bfe7c3 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More tests => 2; |
5 | use File::Temp qw( tempdir tempfile ); |
6 | |
7 | use 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 | } |