Another ex-PVBM assert
[p5sagit/p5-mst-13.2.git] / t / op / re_tests
index 3afdc71..87a3e50 100644 (file)
@@ -253,6 +253,14 @@ a[-]?c     ac      y       $&      ac
 ([a-c]*)\1     abcabc  y       $1      abc
 \1     -       c       -       Reference to nonexistent group
 \2     -       c       -       Reference to nonexistent group
+\g1    -       c       -       Reference to nonexistent group
+\g-1   -       c       -       Reference to nonexistent or unclosed group
+\g{1}  -       c       -       Reference to nonexistent group
+\g{-1} -       c       -       Reference to nonexistent or unclosed group
+\g0    -       c       -       Reference to invalid group 0
+\g-0   -       c       -       Reference to invalid group 0
+\g{0}  -       c       -       Reference to invalid group 0
+\g{-0} -       c       -       Reference to invalid group 0
 (a)|\1 a       y       -       -
 (a)|\1 x       n       -       -
 (a)|\2 -       c       -       Reference to nonexistent group
@@ -261,6 +269,8 @@ a[-]?c      ac      y       $&      ac
 ((\3|b)\2(a)x)+        aaxabxbaxbbx    n       -       -
 ((\3|b)\2(a)x)+        aaaxabaxbaaxbbax        y       $&-$1-$2-$3     bbax-bbax-b-a
 ((\3|b)\2(a)){2,}      bbaababbabaaaaabbaaaabba        y       $&-$1-$2-$3     bbaaaabba-bba-b-a
+#Bug #3589 - up to perl-5.6.0 matches incorrectly, from 5.6.1 not anymore
+^((.)?a\2)+$   babadad n       -       -
 (a)|(b)        b       y       $-[0]   0
 (a)|(b)        b       y       $+[0]   1
 (a)|(b)        b       y       x$-[1]  x
@@ -1326,3 +1336,5 @@ foo(\h)bar        foo\tbar        y       $1      \t
 (\h)(\H)       foo\tbar        y       $1-$2   \t-b
 
 .*\z   foo\n   y       -       -
+^(?:(\d)x)?\d$ 1       y       ${\(defined($1)?1:0)}   0       
+.*?(?:(\w)|(\w))x      abx     y       $1-$2   b-