This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove use of Test::Stream per ilmari's patch on p5p.
authorJames E Keenan <jkeenan@cpan.org>
Sun, 8 Mar 2015 23:48:58 +0000 (19:48 -0400)
committerRicardo Signes <rjbs@cpan.org>
Wed, 11 Mar 2015 12:22:07 +0000 (08:22 -0400)
ext/B/t/b.t

index d9d9e7b..807ea30 100644 (file)
@@ -15,7 +15,6 @@ use strict;
 BEGIN  {
     eval { require threads; threads->import; }
 }
-use Test::Stream 'enable_fork';
 use Test::More;
 
 BEGIN { use_ok( 'B' ); }
@@ -225,11 +224,19 @@ SKIP: {
     skip('no fork', 1)
        unless ($Config::Config{d_fork} or $Config::Config{d_pseudofork});
     my $pid;
+    pipe my $r, my $w or die "Can't pipe: $!";;
     if ($pid = fork) {
+        close $w;
+        my $type = <$r>;
+        close $r;
         waitpid($pid,0);
+        is($type, "B::SPECIAL", "special SV table works after psuedofork");
     }
     else {
-        is(ref B::svref_2object(\(!!0)), "B::SPECIAL", "special SV table works after psuedofork");
+        close $r;
+        $|++;
+        print $w ref B::svref_2object(\(!!0));
+        close $w;
         exit;
     }
 }