From: Tomas Doran (t0m) Date: Wed, 15 Jul 2009 18:15:37 +0000 (+0100) Subject: Fix tests X-Git-Tag: 0.1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-EOL.git;a=commitdiff_plain;h=02016826502935c7dda63c44b0bfc7e87dfa3996 Fix tests --- diff --git a/t/12-fail.t b/t/12-fail.t index ae58908..41a32ad 100644 --- a/t/12-fail.t +++ b/t/12-fail.t @@ -15,11 +15,10 @@ $inc = "-I $inc" if $inc; 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(); @@ -27,11 +26,10 @@ $inc = "-I $inc" if $inc; 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(); @@ -39,7 +37,7 @@ $inc = "-I $inc" if $inc; 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"); } @@ -52,7 +50,7 @@ sub make_bad_file_1 { sub main { print "Hello!\r\n"; -} +} DUMMY return $tmpdir; } @@ -68,7 +66,7 @@ sub make_bad_file_2 { =head1 NAME test.pL - A test script - + =cut sub main { @@ -90,7 +88,8 @@ sub new { my (\$class) = @_; my \$self = bless { }, \$class; return \$self; -} +} + 1; DUMMY