This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add tests for regex recursion
authorDan Collins <dcollinsn@gmail.com>
Fri, 17 Jun 2016 23:40:57 +0000 (19:40 -0400)
committerKarl Williamson <khw@cpan.org>
Sat, 18 Jun 2016 03:15:49 +0000 (21:15 -0600)
d5a00e4af introduced a bug in reginsert that was fixed by da7cf1cc7,
originally documented in [perl #128109]. This patch adds two
regression tests for the testcase reported by Jan Goyvaerts in
[perl #128420].

t/re/re_tests

index 34ac94a..7e8522d 100644 (file)
@@ -1966,6 +1966,8 @@ ab(?#Comment){2}c abbc    y       $&      abbc
 .{1}?? -       c       -       Nested quantifiers
 .{1}?+ -       c       -       Nested quantifiers
 (?:.||)(?|)000000000@  000000000@      y       $&      000000000@              #  [perl #126405]
+aa$|a(?R)a|a   aaa     y       $&      aaa             # [perl 128420] recursive matches
+(?:\1|a)([bcd])\1(?:(?R)|e)\1  abbaccaddedcb   y       $&      abbaccaddedcb           # [perl 128420] recursive match with backreferences
 
 # Keep these lines at the end of the file
 # vim: softtabstop=0 noexpandtab