[Python-checkins] python/dist/src/Lib/test test_unicode.py,1.47.6.3,1.47.6.4

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Tue, 20 Aug 2002 09:57:59 -0700


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

Modified Files:
      Tag: release22-maint
	test_unicode.py 
Log Message:
Fix some endcase bugs in unicode rfind()/rindex() and endswith().
These were reported and fixed by Inyeol Lee in SF bug 595350.  The
endswith() bug is already fixed in 2.3; I'll fix the others in
2.3 next.


Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.47.6.3
retrieving revision 1.47.6.4
diff -C2 -d -r1.47.6.3 -r1.47.6.4
*** test_unicode.py	22 Apr 2002 18:42:44 -0000	1.47.6.3
--- test_unicode.py	20 Aug 2002 16:57:56 -0000	1.47.6.4
***************
*** 84,87 ****
--- 84,91 ----
  
  test('rfind', u'abcdefghiabc', 9, u'abc')
+ test('rfind', 'abcdefghiabc', 9, u'abc')
+ test('rfind', 'abcdefghiabc', 12, u'')
+ test('rfind', u'abcdefghiabc', 12, '')
+ test('rfind', u'abcdefghiabc', 12, u'')
  
  test('lower', u'HeLLo', u'hello')
***************
*** 212,215 ****
--- 216,221 ----
  test('endswith', u'ab', 0, u'ab', 0, 1)
  test('endswith', u'ab', 0, u'ab', 0, 0)
+ test('endswith', 'helloworld', 1, u'd')
+ test('endswith', 'helloworld', 0, u'l')
  
  test('expandtabs', u'abc\rab\tdef\ng\thi', u'abc\rab      def\ng       hi')