X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-EOL.git;a=blobdiff_plain;f=t%2F12-fail.t;h=066534442f0ae195ac2fc28809545c6458160908;hp=eef773be03bc9c463ed13e0c80e41e8f12593068;hb=939ef6135463a53256f555cf9bc6846c5d4c6b31;hpb=c7727ff947f82d977f7c80aece4a8fdb6118dea1 diff --git a/t/12-fail.t b/t/12-fail.t index eef773b..0665344 100644 --- a/t/12-fail.t +++ b/t/12-fail.t @@ -23,7 +23,7 @@ $inc = "-I $inc" if $inc; local $/ = undef; open my $fh, '<', $outfile or die $!; my $content = <$fh>; - like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line 4/m, 'windows EOL found in tmp file 1' ); + like( $content, qr/^not ok 1 - No incorrect line endings in '[^']*' \Qon line 4: [\r]/m, 'windows EOL found in tmp file 1' ); unlink $outfile; } { @@ -33,7 +33,7 @@ $inc = "-I $inc" if $inc; open my $fh, '<', $outfile or die $!; local $/ = undef; my $content = <$fh>; - like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line \d+/m, 'windows EOL found in tmp file2 ' ); + like( $content, qr/^not ok 1 - No incorrect line endings in '[^']*' \Qon line 8: [\r][\r][\r][\r][\r][\r][\r]/m, 'windows EOL found in tmp file2 ' ); unlink $outfile; } { @@ -43,7 +43,7 @@ $inc = "-I $inc" if $inc; open my $fh, '<', $outfile or die $!; local $/ = undef; my $content = <$fh>; - like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line \d+/m, 'windows EOL found in tmp file 3' ); + like( $content, qr/^not ok 1 - No incorrect line endings in '[^']*' \Qon line 9: [\r][\r][\r]/m, 'windows EOL found in tmp file 3' ); unlink $outfile; } @@ -54,7 +54,7 @@ $inc = "-I $inc" if $inc; open my $fh, '<', $outfile or die $!; local $/ = undef; my $content = <$fh>; - like( $content, qr/^not ok 1 - No windows line endings in '[^']*' on line \d+/m, 'windows EOL found in tmp file 4' ); + like( $content, qr/^not ok 1 - No incorrect line endings in '[^']*' \Qon line 13: [\s][\t][\s][\s]/m, 'Trailing ws EOL found in tmp file 4' ); unlink $outfile; } @@ -151,7 +151,7 @@ test.pL - A test script sub main { DUMMY -print $fh qq{ print "Hello!\n"; \n}; # <-- whitespace +print $fh qq{ print "Hello!\n"; \t \n}; # <-- whitespace print $fh '}'; return $tmpdir;