diff options
author | Yves Orton <demerphq@gmail.com> | 2006-11-29 02:07:43 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-29 09:30:02 +0000 |
commit | 5624f11d89c15fde037a59d42ad53114f8b91abd (patch) | |
tree | 1ca98fc3774fd33edc2a52ebd078fe1db14323f5 /t | |
parent | d6e4b61bc1b0f85e460abb04833aa4f8ece9a2d1 (diff) | |
download | perl-5624f11d89c15fde037a59d42ad53114f8b91abd.tar.gz |
Change in handling of \RNNN inside nested patterns
Subject: Re: New development release in sight
Message-ID: <9b18b3110611281607i3d583febtd549989dc3cabc8a@mail.gmail.com>
p4raw-id: //depot/perl@29413
Diffstat (limited to 't')
-rwxr-xr-x | t/op/pat.t | 12 | ||||
-rw-r--r-- | t/op/re_tests | 5 |
2 files changed, 14 insertions, 3 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index f337a58ba6..2bc5da6837 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4111,6 +4111,16 @@ for my $c ("z", "\0", "!", chr(254), chr(256)) { $v='foo'; iseq("$1",'bar','$1 is safe after /g - may fail due to specialized config in pp_hot.c') } +{ + local $Message = "http://nntp.perl.org/group/perl.perl5.porters/118663"; + my $qr_barR1 = qr/(bar)\R1/; + ok("foobarbarxyz" =~ $qr_barR1); + ok("foobarbarxyz" =~ qr/foo${qr_barR1}xyz/); + ok("foobarbarxyz" =~ qr/(foo)${qr_barR1}xyz/); + ok("foobarbarxyz" =~ qr/(foo)(bar)\R1xyz/); + ok("foobarbarxyz" =~ qr/(foo${qr_barR1})xyz/); + ok("foobarbarxyz" =~ qr/(foo(bar)\R1)xyz/); +} # Test counter is at bottom of file. Put new tests above here. #------------------------------------------------------------------- @@ -4158,7 +4168,7 @@ ok((q(a)x 100) =~ /^(??{'(.)'x 100})/, iseq(0+$::test,$::TestCount,"Got the right number of tests!"); # Don't forget to update this! BEGIN { - $::TestCount = 1369; + $::TestCount = 1375; print "1..$::TestCount\n"; } diff --git a/t/op/re_tests b/t/op/re_tests index 4279dd6843..cde5ccc8e9 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -1190,5 +1190,6 @@ a*(*F) aaaab n - - (a)(?:(?-1)|(?+1))(b) abb y $1-$2 a-b (a)(?:(?-1)|(?+1))(b) acb n - - -(foo)(\R1) foofoo y $1-$2 foo-foo -(foo)(\R1)(foo)(\R1) foofoofoofoo y $1-$2-$3-$4 foo-foo-foo-foo +(foo)(\R2) foofoo y $1-$2 foo-foo +(foo)(\R2)(foo)(\R2) foofoofoofoo y $1-$2-$3-$4 foo-foo-foo-foo +(([abc]+) \R1)(([abc]+) \R1) abc abccba cba y $2-$4 abc-cba |