File: subexp.t

package info (click to toggle)
libre-engine-re2-perl 0.18%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 440 kB
  • sloc: cpp: 270; perl: 80; makefile: 2; sh: 1
file content (20 lines) | stat: -rw-r--r-- 305 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
=pod

=cut

use Test::More tests => 9;
use re::engine::RE2;

# Croaks on 32
my $subexp = 9;
my $s = "a" x $subexp;
my $r = ("(.)" x $subexp);

if ($s =~ $r) {
    #diag("matched $s against $r");
    for my $num (1 .. $subexp) {
        is($$num, "a", "\$$num eq a");
    }
} else {
    fail "no match";
}