summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>1998-07-01 22:14:05 +0200
committerGurusamy Sarathy <gsar@cpan.org>1998-07-04 05:06:52 +0000
commitef64f398041e39403718b830b0e15752f4a1cfbf (patch)
treeedae921f2c92546db97eaed67cedba0012d6d7fd /t
parenta45b45bb1348651ebb0ab7ec1221fce2376aa4a1 (diff)
downloadperl-ef64f398041e39403718b830b0e15752f4a1cfbf.tar.gz
catch nonexistent backrefs in REs
Message-Id: <l03130304b1c027e1df9e@[194.222.64.89]> Date: Wed, 1 Jul 1998 20:14:05 +0200 Subject: Re: [PATCH _66] for bad backrefs -- Message-Id: <l03130300b1c03425261c@[194.222.64.89]> Date: Wed, 1 Jul 1998 20:47:16 +0200 Subject: Re: [PATCH _66] for bad backrefs p4raw-id: //depot/perl@1293
Diffstat (limited to 't')
-rw-r--r--t/op/re_tests10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/op/re_tests b/t/op/re_tests
index dd54a2a5b5..78d89be11c 100644
--- a/t/op/re_tests
+++ b/t/op/re_tests
@@ -164,6 +164,16 @@ a(bc)d abcd y $1-\$1-\\$1 bc-$1-\bc
a[-]?c ac y $& ac
(abc)\1 abcabc y $1 abc
([a-c]*)\1 abcabc y $1 abc
+\1 - c - /\1/: reference to nonexistent group
+\2 - c - /\2/: reference to nonexistent group
+(a)|\1 a y - -
+(a)|\1 x n - -
+(a)|\2 - c - /(a)|\2/: reference to nonexistent group
+(([a-c])b*?\2)* ababbbcbc y $&-$1-$2 ababb-bb-b
+(([a-c])b*?\2){3} ababbbcbc y $&-$1-$2 ababbbcbc-cbc-c
+((\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
'abc'i ABC y $& ABC
'abc'i XBC n - -
'abc'i AXC n - -