summaryrefslogtreecommitdiff
path: root/lib/Test
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2001-09-25 13:43:49 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-25 21:40:04 +0000
commitabd4b01718d060ee5fa3459d2ac9adda3ba01743 (patch)
tree0d279033f2fa2817ed5eae490b9b07ef30bfbca8 /lib/Test
parent83b38b2a42f821897bf78f1fe8fe8c842d25db65 (diff)
downloadperl-abd4b01718d060ee5fa3459d2ac9adda3ba01743.tar.gz
fix test.deparse
Message-ID: <20010925174349.B19534@blackrider> p4raw-id: //depot/perl@12215
Diffstat (limited to 'lib/Test')
-rw-r--r--lib/Test/Simple.pm19
-rw-r--r--lib/Test/Utils.pm2
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;
}