summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/io/fflush.t17
1 files changed, 14 insertions, 3 deletions
diff --git a/t/io/fflush.t b/t/io/fflush.t
index fbf6b47fe1..eab9a01c97 100644
--- a/t/io/fflush.t
+++ b/t/io/fflush.t
@@ -23,17 +23,19 @@ my $fflushall = defined $Config{fflushall} ? $Config{fflushall} eq 'define' ? 1
my $d_fork = defined $Config{d_fork} ? $Config{d_fork} eq 'define' ? 1 : 0 : 0;
if ($useperlio || $fflushNULL || $d_sfio) {
- print "1..4\n";
+ print "1..7\n";
} else {
if ($fflushall) {
- print "1..4\n";
+ print "1..7\n";
} else {
print "1..0 # Skip: fflush(NULL) or equivalent not available\n";
exit;
}
}
-my $runperl = qq{$^X "-I../lib"};
+my $runperl = $^X =~ m/\s/ ? qq{"$^X"} : $^X;
+$runperl .= qq{ "-I../lib"};
+
my @delete;
END {
@@ -129,3 +131,12 @@ for (qw(system qx popen)) {
push @delete, $f;
++$t;
}
+
+my $cmd = qq[$runperl -e "print qq[ok \$_\\n] for ($t..$t+2)"];
+open my $CMD, "$cmd |" or die "Can't open pipe to '$cmd': $!";
+while (<$CMD>) {
+ system("$runperl -e 0");
+ print;
+}
+close $CMD;
+$t += 3;