diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index c3c70bc4c4f..46f442d257c 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -28,6 +28,10 @@ except: raise TestFailed, "re.search" +# Try nasty case that overflows the straightforward recursive +# implementation of repeated groups. +assert re.match('(x)*', 50000*'x').span() == (0, 50000) + if verbose: print 'Running tests on re.sub'