From: Rafael Garcia-Suarez Date: Tue, 3 Jul 2007 14:34:05 +0000 (+0000) Subject: More tests for \g errors in regular expressions X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=88307081960aa9b8190f0fe9acb8906b2372e7ec;p=p5sagit%2Fp5-mst-13.2.git More tests for \g errors in regular expressions p4raw-id: //depot/perl@31525 --- diff --git a/t/op/re_tests b/t/op/re_tests index f4dca6e..55b4300 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -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