From: Michael G. Schwern Date: Thu, 15 Nov 2001 19:26:40 +0000 (-0500) Subject: runperl(), \n and stdin X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5ae09a77295fca987415b2818894f1f62a4219ba;p=p5sagit%2Fp5-mst-13.2.git runperl(), \n and stdin Message-ID: <20011115192640.R31399@blackrider> p4raw-id: //depot/perl@13032 --- diff --git a/t/test.pl b/t/test.pl index 90e7ed5..e4411af 100644 --- a/t/test.pl +++ b/t/test.pl @@ -223,6 +223,11 @@ 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; + if ($is_mswin || $is_netware || $is_vms) { $runperl = qq{$^X -e "print qq(} . $args{stdin} . q{)" | } . $runperl;