[Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.24,1.25 re_tests.py,1.28,1.29

Fredrik Lundh effbot@users.sourceforge.net
Mon, 02 Jul 2001 12:54:30 -0700


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

Modified Files:
	test_sre.py re_tests.py 
Log Message:


reapplied darryl gallion's minimizing repeat fix.  I'm still not 100%
sure about this one, but test #133283 now works even with the fix in
place, and so does the test suite.  we'll see what comes up...


Index: test_sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** test_sre.py	2001/03/22 23:48:28	1.24
--- test_sre.py	2001/07/02 19:54:28	1.25
***************
*** 246,250 ****
  test("sre.match('(x)*', 50000*'x').span()", (0, 50000), RuntimeError)
  test("sre.match(r'(x)*y', 50000*'x'+'y').span()", (0, 50001), RuntimeError)
! test("sre.match(r'(x)*?y', 50000*'x'+'y').span()", (0, 50001), RuntimeError)
  
  from re_tests import *
--- 246,250 ----
  test("sre.match('(x)*', 50000*'x').span()", (0, 50000), RuntimeError)
  test("sre.match(r'(x)*y', 50000*'x'+'y').span()", (0, 50001), RuntimeError)
! test("sre.match(r'(x)*?y', 50000*'x'+'y').span()", (0, 50001))
  
  from re_tests import *

Index: re_tests.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** re_tests.py	2001/03/22 15:50:10	1.28
--- re_tests.py	2001/07/02 19:54:28	1.29
***************
*** 639,642 ****
--- 639,644 ----
      # bug 130748: ^* should be an error (nothing to repeat)
      (r'^*', '', SYNTAX_ERROR),
+     # bug 133283: minimizing repeat bug
+     (r'"(?:\\"|[^"])*?"', r'"\""', SUCCEED, 'found', r'"\"'),
  ]