[Python-checkins] CVS: python/dist/src/Lib/test test_re.py,1.20,1.21

A.M. Kuchling python-dev@python.org
Wed, 2 Aug 2000 19:06:48 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv20021

Modified Files:
	test_re.py 
Log Message:
Add nasty test case that overflows the stack with a repeated group


Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** test_re.py	2000/06/30 16:25:20	1.20
--- test_re.py	2000/08/03 02:06:45	1.21
***************
*** 29,32 ****
--- 29,36 ----
      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'