X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftest.pl;h=7df12b6f4d30ee6306e26e56c46b142273e6e4f5;hb=dc459aad73ffc3aaf43c03d9908415c433fd93ba;hp=a58b86cf51fc2b6a3e82413db9bdb1eb0b8b1180;hpb=21f5a6076e634a7ee61d6f5aa4e44bf6708db9fb;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/test.pl b/t/test.pl index a58b86c..7df12b6 100644 --- a/t/test.pl +++ b/t/test.pl @@ -378,15 +378,28 @@ sub runperl { $runperl .= qq( "$args{progfile}"); } if (defined $args{stdin}) { - # so we don't try to put literal newlines and crs onto the - # command line. - $args{stdin} =~ s/\n/\\n/g; - $args{stdin} =~ s/\r/\\r/g; + # so we don't try to put literal newlines and crs onto the + # command line. + $args{stdin} =~ s/\n/\\n/g; + $args{stdin} =~ s/\r/\\r/g; if ($is_mswin || $is_netware || $is_vms) { $runperl = qq{$^X -e "print qq(} . $args{stdin} . q{)" | } . $runperl; } + elsif ($is_macos) { + # MacOS can only do two processes under MPW at once; + # the test itself is one; we can't do two more, so + # write to temp file + my $stdin = qq{$^X -e 'print qq(} . $args{stdin} . qq{)' > teststdin; }; + if ($args{verbose}) { + my $stdindisplay = $stdin; + $stdindisplay =~ s/\n/\n\#/g; + print STDERR "# $stdindisplay\n"; + } + `$stdin`; + $runperl .= q{ < teststdin }; + } else { $runperl = qq{$^X -e 'print qq(} . $args{stdin} . q{)' | } . $runperl;