summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2009-12-19 10:05:12 -0600
committerCraig A. Berry <craigberry@mac.com>2009-12-19 10:05:12 -0600
commit15fe4dead04687a0a035e4103e5bb3965fa4c9f4 (patch)
treefe8104a3c7e1887b7c008dd71940115685b811c2
parentd1585ceaf66a98c6f5f3520ecf3dec4ccc98a1d6 (diff)
downloadperl-15fe4dead04687a0a035e4103e5bb3965fa4c9f4.tar.gz
runperl may modify arguments passed to it.
So be cautious about reusing them. In this case, filenames acquired quotes in them, which are not legal in filenames on VMS.
-rw-r--r--t/io/inplace.t9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/io/inplace.t b/t/io/inplace.t
index 2ab5bf78c4..a27881895b 100644
--- a/t/io/inplace.t
+++ b/t/io/inplace.t
@@ -57,7 +57,11 @@ SKIP:
is(scalar(@ARGV), 0, "consumed ARGV");
- is( runperl( prog => 'print<>;', args => \@ifiles ),
+# runperl may quote its arguments, so don't expect to be able
+# to reuse things you send it.
+
+ my @my_ifiles = @ifiles;
+ is( runperl( prog => 'print<>;', args => \@my_ifiles ),
"foobar\nfoobar\nfoobar\n",
"normal inplace edit");
}
@@ -78,7 +82,8 @@ SKIP:
is(scalar(@ARGV), 0, "consumed ARGV");
- is( runperl( prog => 'print<>;', args => \@ifiles ),
+ my @my_ifiles = @ifiles;
+ is( runperl( prog => 'print<>;', args => \@my_ifiles ),
"foobar\nfoobar\nfoobar\n",
"normal inplace edit");
}