summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-02-21 19:50:14 +0200
committerhv <hv@crypt.org>2003-02-25 14:04:03 +0000
commit83b43d9236da9ea6e31fd2df2474f4d7f7220a85 (patch)
treec714305243ad881b977e2feefafca87189030239 /t
parent22e13caa16a0052ac27896caeb4c33581f86e239 (diff)
downloadperl-83b43d9236da9ea6e31fd2df2474f4d7f7220a85.tar.gz
[perl #20682] [fix] @- array not visible in s///
Message-ID: <20030221155014.GB793@ratsnest.hole> p4raw-id: //depot/perl@18776
Diffstat (limited to 't')
-rwxr-xr-xt/op/subst.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/subst.t b/t/op/subst.t
index 689b74f23f..f30f593e5a 100755
--- a/t/op/subst.t
+++ b/t/op/subst.t
@@ -7,7 +7,7 @@ BEGIN {
}
require './test.pl';
-plan( tests => 127 );
+plan( tests => 128 );
$x = 'foo';
$_ = "x";
@@ -521,3 +521,9 @@ is("<$_> <$s>", "<> <4>", "[perl #7806]");
$_ = "1111";
is(s/(??{1})/2/eg, 4, '#20684 s/// with (??{..}) inside');
+# [perl #20682] @- not visible in replacement
+$_ = "123";
+/(2)/; # seed @- with something else
+s/(1)(2)(3)/$#- (@-)/;
+is($_, "3 (0 0 1 2)", '#20682 @- not visible in replacement');
+