Subject: | Bugs for regexes with {n} quantifiers |
According to perlre, regex a{n} means exactly n times of a, so regex
"a{2}" should be equivalent to regex "aa". Unfortunately the
corresponding test fails on Regexp::Compare:
# bug.t
use Test::More tests => 2;
use Regexp::Compare qw(is_less_or_equal);
my ($a, $b) = ('aa', 'a{2}');
ok is_less_or_equal($a, $b), "$a <= $b";
ok is_less_or_equal($b, $a), "$b <= $a";
The result of "nmake test" is as follows:
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/bug.t 1 256 2 1 50.00% 2
Subject: | bug.t |
use Test::More tests => 2;
use Regexp::Compare qw(is_less_or_equal);
my ($a, $b) = ('aa', 'a{2}');
ok is_less_or_equal($a, $b), "$a <= $b";
ok is_less_or_equal($b, $a), "$b <= $a";