[Python-checkins] python/dist/src/Lib/test test_unicode.py,1.65,1.66
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
2002年8月20日 10:29:31 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv18283/Lib/test
Modified Files:
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 was already fixed in 2.3, but this adds some more test
cases.
Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** test_unicode.py 11 Aug 2002 12:23:03 -0000 1.65
--- test_unicode.py 20 Aug 2002 17:29:28 -0000 1.66
***************
*** 108,111 ****
--- 108,115 ----
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')
***************
*** 242,245 ****
--- 246,251 ----
test('endswith', u'ab', False, u'ab', 0, 1)
test('endswith', u'ab', False, u'ab', 0, 0)
+ test('endswith', 'helloworld', True, u'd')
+ test('endswith', 'helloworld', False, u'l')
test('expandtabs', u'abc\rab\tdef\ng\thi', u'abc\rab def\ng hi')