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

Guido van Rossum gvanrossum@users.sourceforge.net
Fri, 10 Aug 2001 07:50:00 -0700


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

Modified Files:
	test_re.py 
Log Message:
Check in a testcase for SF bug #449000: re.sub(r'\n', ...) broke.


Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** test_re.py	2001/03/22 15:51:28	1.30
--- test_re.py	2001/08/10 14:49:58	1.31
***************
*** 60,63 ****
--- 60,69 ----
  
      verify(re.sub('^\s*', 'X', 'test') == 'Xtest')
+ 
+     # Test for sub() on escaped characters, see SF bug #449000
+     verify(re.sub(r'\r\n', r'\n', 'abc\r\ndef\r\n') == 'abc\ndef\n')
+     verify(re.sub('\r\n', r'\n', 'abc\r\ndef\r\n') == 'abc\ndef\n')
+     verify(re.sub(r'\r\n', '\n', 'abc\r\ndef\r\n') == 'abc\ndef\n')
+     verify(re.sub('\r\n', '\n', 'abc\r\ndef\r\n') == 'abc\ndef\n')
  except AssertionError:
      raise TestFailed, "re.sub"