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

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


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

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


Index: test_sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** test_sre.py	2001/07/02 19:54:28	1.25
--- test_sre.py	2001/08/10 14:52:48	1.26
***************
*** 118,121 ****
--- 118,127 ----
  test(r"""sre.sub(r'(\S)\s+(\S)', r'\1 \2', 'hello  there')""", 'hello there')
  
+ # Test for sub() on escaped characters, see SF bug #449000
+ test(r"""sre.sub(r'\r\n', r'\n', 'abc\r\ndef\r\n')""", 'abc\ndef\n')
+ test(r"""sre.sub('\r\n', r'\n', 'abc\r\ndef\r\n')""", 'abc\ndef\n')
+ test(r"""sre.sub(r'\r\n', '\n', 'abc\r\ndef\r\n')""", 'abc\ndef\n')
+ test(r"""sre.sub('\r\n', '\n', 'abc\r\ndef\r\n')""", 'abc\ndef\n')
+ 
  if verbose:
      print 'Running tests on symbolic references'