diff options
author | Yves Orton <demerphq@gmail.com> | 2006-11-16 21:32:11 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-17 11:06:48 +0000 |
commit | b515a41db88584b4fd1c30cf890c92d3f9697760 (patch) | |
tree | 643257dacfbc7fcf8242f22461428420dfbaebdc /t | |
parent | 432acd5fa9704890f9e1c4b3810c56daa9b791a3 (diff) | |
download | perl-b515a41db88584b4fd1c30cf890c92d3f9697760.tar.gz |
Study SUSPEND (and recursion) properly
Message-ID: <9b18b3110611161132j695ee86ata939a149b08efb11@mail.gmail.com>
p4raw-id: //depot/perl@29301
Diffstat (limited to 't')
-rwxr-xr-x | t/op/pat.t | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index 358fbb08bc..5ab10d062c 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4007,9 +4007,17 @@ for my $c ("z", "\0", "!", chr(254), chr(256)) { iseq($all, 'foo((2*3)+4-3) + bar(2*(3+4)-1*(2-3))'); iseq($all, $_); } +{ + my $spaces=" "; + local $_=join 'bar',$spaces,$spaces; + our $count=0; + s/(?>\s+bar)(?{$count++})//g; + iseq($_,$spaces,"SUSPEND final string"); + iseq($count,1,"Optimiser should have prevented more than one match"); +} +# Test counter is at bottom of file. Put new tests above here. #------------------------------------------------------------------- - # Keep the following tests last -- they may crash perl { # RT#19049 / RT#38869 @@ -4049,7 +4057,7 @@ ok((q(a)x 100) =~ /^(??{'(.)'x 100})/, iseq($_,"!Bang!1!Bang!2!Bang!3!Bang!"); } -# Put new tests above the line, not here. +# Put new tests above the dotted line about a page above this comment # Don't forget to update this! -BEGIN { print "1..1347\n" }; +BEGIN { print "1..1349\n" }; |