diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-07-03 14:34:05 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-07-03 14:34:05 +0000 |
commit | 88307081960aa9b8190f0fe9acb8906b2372e7ec (patch) | |
tree | 2cf09e89daa4fd0823b3be96901879e98d518c2e | |
parent | b72d83b24cdb1d001335c456a4657b1b2d868451 (diff) | |
download | perl-88307081960aa9b8190f0fe9acb8906b2372e7ec.tar.gz |
More tests for \g errors in regular expressions
p4raw-id: //depot/perl@31525
-rw-r--r-- | t/op/re_tests | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/op/re_tests b/t/op/re_tests index f4dca6e1fc..55b43001db 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 |