summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2001-11-15 14:26:40 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-16 00:09:31 +0000
commit5ae09a77295fca987415b2818894f1f62a4219ba (patch)
tree6102915a429e533eb38bf300d2f7284fb0405f10 /t
parent662a0f8c5d8b6f39576444a5a7208fca2f67099e (diff)
downloadperl-5ae09a77295fca987415b2818894f1f62a4219ba.tar.gz
runperl(), \n and stdin
Message-ID: <20011115192640.R31399@blackrider> p4raw-id: //depot/perl@13032
Diffstat (limited to 't')
-rw-r--r--t/test.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/test.pl b/t/test.pl
index 90e7ed5275..e4411af078 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;