diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-09-09 00:40:11 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-09-09 09:05:32 +0000 |
commit | 2c914db612f0533f5da96e872ec005c73724c6fb (patch) | |
tree | 6be28793a009cedbffb268a51f7aba53cc2c7b61 /t/op/pat.t | |
parent | eda88b6dbdc5ca6a51d54f58740f0210e618beb7 (diff) | |
download | perl-2c914db612f0533f5da96e872ec005c73724c6fb.tar.gz |
Fix interaction of (?p{}) and (?>)
To: perl5-porters@perl.org (Mailing list Perl5)
Message-Id: <199909090840.EAA26471@monk.mps.ohio-state.edu>
p4raw-id: //depot/cfgperl@4112
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-x | t/op/pat.t | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index 6312c75cea..768d1b9446 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4,7 +4,7 @@ # the format supported by op/regexp.t. If you want to add a test # that does fit that format, add it to op/re_tests, not here. -print "1..188\n"; +print "1..191\n"; BEGIN { chdir 't' if -d 't'; @@ -865,3 +865,20 @@ print "not " unless("@a" eq ",f,,o,,o, ,b,,a,,r,"); print "ok $test\n"; $test++; +$brackets = qr{ + { (?> [^{}]+ | (?p{ $brackets }) )* } + }x; + +"{{}" =~ $brackets; +print "ok $test\n"; # Did we survive? +$test++; + +"something { long { and } hairy" =~ $brackets; +print "ok $test\n"; # Did we survive? +$test++; + +"something { long { and } hairy" =~ m/((?p{ $brackets }))/; +print "not " unless $1 eq "{ and }"; +print "ok $test\n"; +$test++; + |