From: Michael G. Schwern Date: Tue, 25 Sep 2001 17:43:49 +0000 (-0400) Subject: fix test.deparse X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b62cd5eaea3e4bae0f5204d972f605af3e0e2f18;p=p5sagit%2Fp5-mst-13.2.git fix test.deparse Message-ID: <20010925174349.B19534@blackrider> p4raw-id: //depot/perl@12215 --- diff --git a/lib/Test/Simple.pm b/lib/Test/Simple.pm index dda36a1..f72f393 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 17908eb..1d00f90 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; }