diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/output/test_sre | 1 | ||||
-rw-r--r-- | Lib/test/test_sre.py | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/output/test_sre b/Lib/test/output/test_sre index dbb6e93..64bacc4 100644 --- a/Lib/test/output/test_sre +++ b/Lib/test/output/test_sre @@ -1 +1,2 @@ test_sre +maximum recursion limit exceeded diff --git a/Lib/test/test_sre.py b/Lib/test/test_sre.py index 342c33d..2f16d29 100644 --- a/Lib/test/test_sre.py +++ b/Lib/test/test_sre.py @@ -264,6 +264,16 @@ for flags in [sre.I, sre.M, sre.X, sre.S, sre.L, sre.T, sre.U]: except: print 'Exception raised on flag', flags +if verbose: + print 'Test engine limitations' + +# Try nasty case that overflows the straightforward recursive +# implementation of repeated groups. +try: + assert sre.match('(x)*', 50000*'x').span() == (0, 50000) +except RuntimeError, v: + print v + from re_tests import * if verbose: |