mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix unicode.rsplit()'s bug that ignores separater on the end of string when
using specialized splitter for 1 char sep.
This commit is contained in:
parent
0490fe96d8
commit
7fc4cf57b8
2 changed files with 3 additions and 1 deletions
|
@ -208,6 +208,8 @@ class CommonTest(unittest.TestCase):
|
|||
self.checkequal(['a\x00b', 'c'], 'a\x00b\x00c', 'rsplit', '\x00', 1)
|
||||
self.checkequal(['', ''], 'abcd', 'rsplit', 'abcd')
|
||||
self.checkequal([u'a b', u'c', u'd'], 'a b c d', 'rsplit', u' ', 2)
|
||||
self.checkequal(['', ' endcase'], '| endcase', 'rsplit', '|')
|
||||
self.checkequal(['', ' endcase'], 'test endcase', 'rsplit', 'test')
|
||||
|
||||
def test_strip(self):
|
||||
self.checkequal('hello', ' hello ', 'strip')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue