From: Olivier Mengué Date: Sat, 8 Sep 2012 04:57:40 +0000 (+0200) Subject: 12-fail.t: fix output redirection X-Git-Tag: 1.4~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-EOL.git;a=commitdiff_plain;h=f7dcf484ba018f1de37331b5f3a747709505b2c8 12-fail.t: fix output redirection If the destination for &2 must be the same as &1 (2>&1), &1 must be redirected before &2 is redirected. This is not Win32 specific. --- diff --git a/t/12-fail.t b/t/12-fail.t index 3587c0b..dae6fc7 100644 --- a/t/12-fail.t +++ b/t/12-fail.t @@ -19,7 +19,7 @@ $inc = "-I $inc" if $inc; { my $dir = make_bad_file_1(); my (undef, $outfile) = tempfile(); - ok( `$perl $inc -MTest::EOL -e "all_perl_files_ok( '$dir' )" 2>&1 > $outfile` ); + ok( `$perl $inc -MTest::EOL -e "all_perl_files_ok( '$dir' )" > $outfile 2>&1` ); local $/ = undef; open my $fh, '<', $outfile or die $!; my $content = <$fh>; @@ -29,7 +29,7 @@ $inc = "-I $inc" if $inc; { my $dir = make_bad_file_2(); my (undef, $outfile) = tempfile(); - ok( `$perl $inc -MTest::EOL -e "all_perl_files_ok( '$dir' )" 2>&1 > $outfile` ); + ok( `$perl $inc -MTest::EOL -e "all_perl_files_ok( '$dir' )" > $outfile 2>&1` ); open my $fh, '<', $outfile or die $!; local $/ = undef; my $content = <$fh>; @@ -39,7 +39,7 @@ $inc = "-I $inc" if $inc; { my ($dir, $file) = make_bad_file_3(); my (undef, $outfile) = tempfile(); - ok( `$perl $inc -MTest::EOL -e "all_perl_files_ok( '$file' )" 2>&1 > $outfile` ); + ok( `$perl $inc -MTest::EOL -e "all_perl_files_ok( '$file' )" > $outfile 2>&1` ); open my $fh, '<', $outfile or die $!; local $/ = undef; my $content = <$fh>; @@ -50,7 +50,7 @@ $inc = "-I $inc" if $inc; { my $dir = make_bad_file_4(); my (undef, $outfile) = tempfile(); - ok( `$perl $inc -MTest::EOL -e "all_perl_files_ok({trailing_whitespace => 1}, '$dir' )" 2>&1 > $outfile` ); + ok( `$perl $inc -MTest::EOL -e "all_perl_files_ok({trailing_whitespace => 1}, '$dir' )" > $outfile 2>&1` ); open my $fh, '<', $outfile or die $!; local $/ = undef; my $content = <$fh>;