From 3150c6161e300b1e325939ff22b76f91a8307cf5 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Wed, 24 Jul 2013 08:35:46 -0700 Subject: [PATCH] fresh_perl.t: Make the test for #3066 more explicit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This test was added to make sure that constants don’t become undefined as a result of being shared between ops. What was tested, though, was a side-effect, and not the actual bug itself. This behaviour has changed (sub(){42} now returns a mutable val- ue), so this test needs to change, too. It was only passing under ithreads, and only as the result of another bug, which the next com- mit will fix. --- t/run/fresh_perl.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index 376ceaf..7f90cd3 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -527,12 +527,13 @@ my $x = "foo"; EXPECT foo ######## +# [perl #3066] sub C () { 1 } -sub M { $_[0] = 2; } +sub M { print "$_[0]\n" } eval "C"; M(C); EXPECT -Modification of a read-only value attempted at - line 2. +1 ######## print qw(ab a\b a\\b); EXPECT -- 2.7.4