[Python-checkins] CVS: python/dist/src/Lib/test test_strop.py,1.10,1.10.4.1

Thomas Wouters twouters@users.sourceforge.net
Wed, 23 May 2001 07:38:55 -0700


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

Modified Files:
      Tag: release21-maint
	test_strop.py 
Log Message:

Net result of Tim's checkins to stropmodule.c (2.78, 2.79, 2.80, 2.81),
stringobject.c (2.114, 2.115) and test_strop.py (1.11, 1.12). Fixes
'replace' behaviour on systems on which 'malloc(0)' returns NULL (together
with previous checkins) and re-synchs the string-operation code in
stringobject.c and stropmodule.c, with the exception of 'replace', which has
the old semantics in stropmodule but the new semantics in stringobjects.



Index: test_strop.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_strop.py,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -C2 -r1.10 -r1.10.4.1
*** test_strop.py	2001/01/17 21:51:36	1.10
--- test_strop.py	2001/05/23 14:38:53	1.10.4.1
***************
*** 78,81 ****
--- 78,83 ----
  test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 3)
  test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 4)
+ # CAUTION:  a replace count of 0 means infinity only to strop, not to the
+ # string .replace() method or to the string.replace() function.
  test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 0)
  test('replace', 'one!two!three!', 'one@two@three@', '!', '@')