[Python-checkins] CVS: python/dist/src/Lib/test re_tests.py,1.22,1.23

Fredrik Lundh python-dev@python.org
Tue, 3 Oct 2000 12:22:30 -0700


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

Modified Files:
	re_tests.py 
Log Message:


Recompile pattern if (?x) flag was found inside the pattern during the
first scan.  Closes bug #115040.


Index: re_tests.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** re_tests.py	2000/10/03 16:29:23	1.22
--- re_tests.py	2000/10/03 19:22:26	1.23
***************
*** 613,620 ****
      # bug 111869 (PRE/PCRE fails on this one, SRE doesn't)
      (r'.*d', 'abc\nabd', SUCCEED, 'found', 'abd'),
!     # bug 112468
      ('(', '', SYNTAX_ERROR),
      ('[\\41]', '!', SUCCEED, 'found', '!'),
!     # bug 115618
      (r'(?<!abc)(d.f)', 'abcdefdof', SUCCEED, 'found', 'dof'),
  ]
--- 613,622 ----
      # bug 111869 (PRE/PCRE fails on this one, SRE doesn't)
      (r'.*d', 'abc\nabd', SUCCEED, 'found', 'abd'),
!     # bug 112468: various expected syntax errors
      ('(', '', SYNTAX_ERROR),
      ('[\\41]', '!', SUCCEED, 'found', '!'),
!     # bug 115040: rescan if flags are modified inside pattern
!     (r' (?x)foo ', 'foo', SUCCEED, 'found', 'foo'),
!     # bug 115618: negative lookahead
      (r'(?<!abc)(d.f)', 'abcdefdof', SUCCEED, 'found', 'dof'),
  ]