Add nasty test case that overflows the stack with a repeated group

This commit is contained in:
Andrew M. Kuchling 2000-08-03 02:06:45 +00:00
parent e365fb8d1f
commit a3eacc472c
1 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,10 @@ try:
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'