diff options
author | Michael G. Schwern <schwern@pobox.com> | 2001-09-25 13:43:49 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-25 21:40:04 +0000 |
commit | abd4b01718d060ee5fa3459d2ac9adda3ba01743 (patch) | |
tree | 0d279033f2fa2817ed5eae490b9b07ef30bfbca8 | |
parent | 83b38b2a42f821897bf78f1fe8fe8c842d25db65 (diff) | |
download | perl-abd4b01718d060ee5fa3459d2ac9adda3ba01743.tar.gz |
fix test.deparse
Message-ID: <20010925174349.B19534@blackrider>
p4raw-id: //depot/perl@12215
-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; } |