From: Dagfinn Ilmari Mannsåker Date: Sat, 12 Sep 2015 11:31:23 +0000 (+0100) Subject: Avoid emitting trailing whitespace in test (oh, the irony) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-EOL.git;a=commitdiff_plain;h=d3afcf90a189151bcc7cc871c67952e059fd37e1 Avoid emitting trailing whitespace in test (oh, the irony) --- diff --git a/lib/Test/EOL.pm b/lib/Test/EOL.pm index a54e24b..668d499 100644 --- a/lib/Test/EOL.pm +++ b/lib/Test/EOL.pm @@ -87,7 +87,7 @@ sub _show_whitespace { sub _debug_line { my ( $options, $line ) = @_; $line->[2] =~ s/\n\z//g; - return "line $line->[1]: $line->[0] " . ( + return "line $line->[1]: $line->[0]" . ( $options->{show_lines} ? qq{: } . _show_whitespace( $line->[2] ) : q{} ); } diff --git a/t/12-fail.t b/t/12-fail.t index 1378779..4f27208 100644 --- a/t/12-fail.t +++ b/t/12-fail.t @@ -31,7 +31,7 @@ $inc = "-I $inc" if $inc; { my ($dir, $file) = make_bad_file_3(); run_ok( "all_perl_files_ok( '$file' )", - qr/^not ok 1 - No incorrect line endings in '[^']*' \Qon line 1: [\r] /m, + qr/^not ok 1 - No incorrect line endings in '[^']*' \Qon line 1: [\r]/m, 'windows EOL found in tmp file 3' ); }