From: Craig A. Berry Date: Sat, 19 Dec 2009 16:05:12 +0000 (-0600) Subject: runperl may modify arguments passed to it. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=15fe4dead04687a0a035e4103e5bb3965fa4c9f4;p=p5sagit%2Fp5-mst-13.2.git 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. --- diff --git a/t/io/inplace.t b/t/io/inplace.t index 2ab5bf7..a278818 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"); }