Multiple consecutive writes on PerlIO::Scalar
[p5sagit/p5-mst-13.2.git] / t / lib / selfstubber.t
index 212f8ce..2e74a02 100644 (file)
@@ -10,7 +10,9 @@ use Devel::SelfStubber;
 
 my $runperl = "$^X \"-I../lib\"";
 
-$| = 1;
+# ensure correct output ordering for system() calls
+
+select STDERR; $| = 1; select STDOUT; $| = 1;
 
 print "1..12\n";
 
@@ -201,11 +203,11 @@ print "ok 8\n";
 }
 
 # Check that the DATA handle stays open
-system "$runperl -w \"-I$lib\" -MData -e Data::ok";
+system "$runperl -w \"-I$lib\" \"-MData\" -e \"Data::ok\"";
 
 # Possibly a pointless test as this doesn't really verify that it's been
 # stubbed.
-system "$runperl -w \"-I$lib\" -MEnd -e End::lime";
+system "$runperl -w \"-I$lib\" \"-MEnd\" -e \"End::lime\"";
 
 # But check that the documentation after the __END__ survived.
 open FH, "$lib/End.pm" or die $!;