summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2007-03-21 11:39:24 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-22 09:01:37 +0000
commit28d8d7f41ab202dd5f7611033d27ecad44cadd60 (patch)
tree330e1fcd2c3e0573355f25c14fc04ce0e64c608c /t
parentda140a4068f95cc339e9327c1579a94f9f241dd8 (diff)
downloadperl-28d8d7f41ab202dd5f7611033d27ecad44cadd60.tar.gz
Resolve PL_curpm issues with (??{}) and fix corruption of match results when pattern is a qr.
Message-ID: <9b18b3110703210239x540f5ad9mdb41c2ea6229ac31@mail.gmail.com> plus two follow-up patches (minor tweaks) p4raw-id: //depot/perl@30678
Diffstat (limited to 't')
-rwxr-xr-xt/op/pat.t18
1 files changed, 14 insertions, 4 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index 423822abac..71ddbe9e8f 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -4267,11 +4267,11 @@ sub kt
$re = qr/^ ( (??{ $grabit }) ) $ /x;
my @res = '0902862349' =~ $re;
iseq(join("-",@res),"0902862349",
- 'PL_curpm is set properly on nested eval # TODO');
+ 'PL_curpm is set properly on nested eval');
our $qr = qr/ (o) (??{ $1 }) /x;
ok( 'boob'=~/( b (??{ $qr }) b )/x && 1,
- "PL_curpm, nested eval # TODO");
+ "PL_curpm, nested eval");
}
{
@@ -4325,7 +4325,17 @@ sub kt
ok($c=~/${c}|\x{100}/);
ok(@w==0);
}
-
+{
+ local $Message = "corruption of match results of qr// across scopes";
+ my $qr=qr/(fo+)(ba+r)/;
+ 'foobar'=~/$qr/;
+ iseq("$1$2","foobar");
+ {
+ 'foooooobaaaaar'=~/$qr/;
+ iseq("$1$2",'foooooobaaaaar');
+ }
+ iseq("$1$2","foobar");
+}
# Test counter is at bottom of file. Put new tests above here.
#-------------------------------------------------------------------
# Keep the following tests last -- they may crash perl
@@ -4395,7 +4405,7 @@ ok($@=~/\QSequence \k... not terminated in regex;\E/);
iseq(0+$::test,$::TestCount,"Got the right number of tests!");
# Don't forget to update this!
BEGIN {
- $::TestCount = 1652;
+ $::TestCount = 1655;
print "1..$::TestCount\n";
}