From: Andrew Dalke Date: Fri, 26 May 2006 12:31:00 +0000 (+0000) Subject: Test cases for off-by-one errors in string split with multicharacter pattern. X-Git-Tag: v2.5b1~478 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5cc6009f0d4f5fcf19b4854c55659f8dca136cc2;p=python Test cases for off-by-one errors in string split with multicharacter pattern. --- diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 42a94009d3..3a97462a6a 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -297,6 +297,8 @@ class CommonTest(unittest.TestCase): self.checkequal(['aaaa'], 'aaaa', 'split', 'aab') self.checkequal([''], '', 'split', 'aaa') self.checkequal(['aa'], 'aa', 'split', 'aaa') + self.checkequal(['A', 'bobb'], 'Abbobbbobb', 'split', 'bbobb') + self.checkequal(['A', 'B', ''], 'AbbobbBbbobb', 'split', 'bbobb') self.checkequal(['a']*20, ('aBLAH'*20)[:-4], 'split', 'BLAH') self.checkequal(['a']*20, ('aBLAH'*20)[:-4], 'split', 'BLAH', 19)