From 7fc4cf57b8f75784e269e64403a1ea2b08bd512b Mon Sep 17 00:00:00 2001 From: Hye-Shik Chang Date: Tue, 23 Dec 2003 09:10:16 +0000 Subject: Fix unicode.rsplit()'s bug that ignores separater on the end of string when using specialized splitter for 1 char sep. --- Lib/test/string_tests.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/test/string_tests.py') diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index c3e53ad48b9..eafc89a294d 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -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') -- cgit v1.2.3