diff options
-rw-r--r-- | lib/Test/Simple.pm | 19 | ||||
-rw-r--r-- | lib/Test/Utils.pm | 2 |
2 files changed, 12 insertions, 9 deletions
diff --git a/lib/Test/Simple.pm b/lib/Test/Simple.pm index dda36a128f..f72f393d48 100644 --- a/lib/Test/Simple.pm +++ b/lib/Test/Simple.pm @@ -70,16 +70,17 @@ sub no_plan { } - -$| = 1; -open(*TESTOUT, ">&STDOUT") or _whoa(1, "Can't dup STDOUT!"); -open(*TESTERR, ">&STDOUT") or _whoa(1, "Can't dup STDOUT!"); -{ - my $orig_fh = select TESTOUT; - $| = 1; - select TESTERR; +unless( $^C ) { $| = 1; - select $orig_fh; + open(*TESTOUT, ">&STDOUT") or _whoa(1, "Can't dup STDOUT!"); + open(*TESTERR, ">&STDOUT") or _whoa(1, "Can't dup STDOUT!"); + { + my $orig_fh = select TESTOUT; + $| = 1; + select TESTERR; + $| = 1; + select $orig_fh; + } } =head1 NAME diff --git a/lib/Test/Utils.pm b/lib/Test/Utils.pm index 17908ebb1a..1d00f90e8c 100644 --- a/lib/Test/Utils.pm +++ b/lib/Test/Utils.pm @@ -17,6 +17,8 @@ $VERSION = '0.02'; sub my_print (*@) { my($fh, @args) = @_; + return 1 if $^C; + local $\; print $fh @args; } |