summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_re.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 2d3fef8..7002750 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -593,6 +593,8 @@ class ReTests(unittest.TestCase):
self.checkPatternError(r'()(?(1)a|b|c)',
'conditional backref with more than '
'two branches', 10)
+ self.checkPatternError(r'()(?(2)a)',
+ "invalid group reference 2", 5)
def test_re_groupref_overflow(self):
from re._constants import MAXGROUPS