From: Rafael Garcia-Suarez Date: Tue, 15 Apr 2008 12:43:02 +0000 (+0000) Subject: Add a regression test for bug #52658 (fixed by change #33685) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3004175efad37b09a53f117c749139ff8df0a47;p=p5sagit%2Fp5-mst-13.2.git Add a regression test for bug #52658 (fixed by change #33685) based on code by Wolf-Dietrich Moeller p4raw-link: @33685 on //depot/perl: ef0d4e17921ee3de62e9c127fad712496e6d7810 p4raw-id: //depot/perl@33686 --- diff --git a/t/op/pat.t b/t/op/pat.t index 599021f..82cf498 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4595,6 +4595,14 @@ sub kt iseq("@plus","bla blubb",'$+ inside of (?{}) works as expected'); } +# test for bug #52658 +{ + my $reg = '../xxx/'; + my @te = ($reg =~ m{^(/?(?:\.\./)*)}, $reg =~ s/(x)/'b'/eg > 1 ? '##' : '++'); + #print "with bug: (0)=$te[0] (1)=$te[1] reg=$reg\n"; + iseq($reg, '../bbb/'); + iseq($te[0], '../'); +} @@ -4659,7 +4667,7 @@ iseq(0+$::test,$::TestCount,"Got the right number of tests!"); # Don't forget to update this! BEGIN { - $::TestCount = 4029; + $::TestCount = 4031; print "1..$::TestCount\n"; }