local $/ = undef;
open my $fh, '<', $outfile or die $!;
my $content = <$fh>;
- like( $content, qr/^not ok 1 - No tabs in '[^']*' on line 4/m, 'windows EOL found in tmp file 1' );
- #unlink $outfile;
- #system("rm -rf $dir");
+ like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line 4/m, 'windows EOL found in tmp file 1' );
+ unlink $outfile;
+ system("rm -rf $dir");
}
-
{
my $dir = make_bad_file_2();
my (undef, $outfile) = tempfile();
open my $fh, '<', $outfile or die $!;
local $/ = undef;
my $content = <$fh>;
- like( $content, qr/^not ok 1 - No tabs in '[^']*' on line 12/m, 'windows EOL found in tmp file2 ' );
+ like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line \d+/m, 'windows EOL found in tmp file2 ' );
unlink $outfile;
system("rm -rf $dir");
}
-
{
my ($dir, $file) = make_bad_file_3();
my (undef, $outfile) = tempfile();
open my $fh, '<', $outfile or die $!;
local $/ = undef;
my $content = <$fh>;
- like( $content, qr/^not ok 1 - No tabs in '[^']*' on line 6/m, 'windows EOL found in tmp file 3' );
+ like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line \d+/m, 'windows EOL found in tmp file 3' );
unlink $outfile;
system("rm -rf $dir");
}
sub main {
print "Hello!\r\n";
-}
+}\r
DUMMY
return $tmpdir;
}
=head1 NAME
test.pL - A test script
-\r
+\r\r\r\r\r\r\r\r
=cut
sub main {
my (\$class) = @_;\r
my \$self = bless { }, \$class;\r
return \$self;\r
-}\r
+}\r\r\r\r
+
\r
1;\r
DUMMY