t/ree-pcre/subexp.t
raw| 1 | =pod |
| 2 | |
| 3 | =cut |
| 4 | |
| 5 | use Test::More tests => 9; |
| 6 | use re::engine::RE2; |
| 7 | |
| 8 | # Croaks on 32 |
| 9 | my $subexp = 9; |
| 10 | my $s = "a" x $subexp; |
| 11 | my $r = ("(.)" x $subexp); |
| 12 | |
| 13 | if ($s =~ $r) { |
| 14 | #diag("matched $s against $r"); |
| 15 | for my $num (1 .. $subexp) { |
| 16 | is($$num, "a", "\$$num eq a"); |
| 17 | } |
| 18 | } else { |
| 19 | fail "no match"; |
| 20 | } |