This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix test.deparse
authorMichael G. Schwern <schwern@pobox.com>
Tue, 25 Sep 2001 17:43:49 +0000 (13:43 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 25 Sep 2001 21:40:04 +0000 (21:40 +0000)
Message-ID: <20010925174349.B19534@blackrider>

p4raw-id: //depot/perl@12215

lib/Test/Simple.pm
lib/Test/Utils.pm

index dda36a1..f72f393 100644 (file)
@@ -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
index 17908eb..1d00f90 100644 (file)
@@ -17,6 +17,8 @@ $VERSION = '0.02';
 sub my_print (*@) {
     my($fh, @args) = @_;
 
+    return 1 if $^C;
+
     local $\;
     print $fh @args;
 }