[Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.16,1.17

Fredrik Lundh python-dev@python.org
Sun, 14 Jan 2001 15:55:57 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv30958/Lib/test

Modified Files:
	test_sre.py 
Log Message:


-- don't use recursion for unbounded non-greedy repeat
(bugs #115903, #115696)

This is based on a patch by Darrel Gallion.  I'm not 100%
sure about this fix, but I haven't managed to come up with
any test case it cannot handle...


Index: test_sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** test_sre.py	2001/01/14 15:15:37	1.16
--- test_sre.py	2001/01/14 23:55:55	1.17
***************
*** 249,253 ****
       (0, 50001), RuntimeError)
  test(r"""sre.match(r'(x)*?y', 50000*'x'+'y').span()""",
!      (0, 50001), RuntimeError)
  
  from re_tests import *
--- 249,253 ----
       (0, 50001), RuntimeError)
  test(r"""sre.match(r'(x)*?y', 50000*'x'+'y').span()""",
!      (0, 50001)) # this works in 2.1
  
  from re_tests import *