[Python-checkins] CVS: python/dist/src/Lib/test string_tests.py,1.7,1.8

Tim Peters tim_one@users.sourceforge.net
Wed, 09 May 2001 16:00:28 -0700


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

Modified Files:
	string_tests.py 
Log Message:
SF bug #422088: [OSF1 alpha] string.replace().
Platform blew up on "123".replace("123", "").  Michael Hudson pinned the
blame on platform malloc(0) returning NULL.
This is a candidate for all bugfix releases.


Index: string_tests.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/string_tests.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** string_tests.py	2001/02/09 11:43:35	1.7
--- string_tests.py	2001/05/09 23:00:26	1.8
***************
*** 178,181 ****
--- 178,187 ----
      test('replace', 'one!two!three!', 'one!two!three!', 'x', '@')
      test('replace', 'one!two!three!', 'one!two!three!', 'x', '@', 2)
+     # Next three for SF bug 422088: [OSF1 alpha] string.replace(); died with
+     # MemoryError due to empty result (platform malloc issue when requesting
+     # 0 bytes).
+     test('replace', '123', '', '123', '')
+     test('replace', '123123', '', '123', '')
+     test('replace', '123x123', 'x', '123', '')
  
      test('startswith', 'hello', 1, 'he')