diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-28 20:26:30 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-28 20:26:30 +0000 |
commit | dc459aad73ffc3aaf43c03d9908415c433fd93ba (patch) | |
tree | 981bdcf9828bbd255b79fd1181324eb2b45d8a61 /t/test.pl | |
parent | 21f5a6076e634a7ee61d6f5aa4e44bf6708db9fb (diff) | |
download | perl-dc459aad73ffc3aaf43c03d9908415c433fd93ba.tar.gz |
Integrate #16254 from macperl;
Fix most tests on MacOS (not yet ext/ or /lib)
p4raw-id: //depot/perl@16257
Diffstat (limited to 't/test.pl')
-rw-r--r-- | t/test.pl | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -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; |