Skip to content

Commit

Permalink
Version 0.07
Browse files Browse the repository at this point in the history
Flushing problem caused intermixed prints and test output not to come
out right when piped.
  • Loading branch information
schwern committed Nov 29, 2001
1 parent 84a967a commit 2d5ba6c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Test/Builder.pm
Expand Up @@ -8,7 +8,7 @@ $^C ||= 0;

use strict;
use vars qw($VERSION $CLASS);
$VERSION = 0.06;
$VERSION = 0.07;
$CLASS = __PACKAGE__;

my $IsVMS = $^O eq 'VMS';
Expand Down Expand Up @@ -748,8 +748,14 @@ unless( $^C ) {
# test suites while still getting normal test output.
open(TESTOUT, ">&STDOUT") or die "Can't dup STDOUT: $!";
open(TESTERR, ">&STDERR") or die "Can't dup STDERR: $!";

# Set everything to unbuffered else plain prints to STDOUT will
# come out in the wrong order from our own prints.
_autoflush(\*TESTOUT);
_autoflush(\*STDOUT);
_autoflush(\*TESTERR);
_autoflush(\*STDERR);

$CLASS->output(\*TESTOUT);
$CLASS->failure_output(\*TESTERR);
$CLASS->todo_output(\*TESTOUT);
Expand Down

0 comments on commit 2d5ba6c

Please sign in to comment.