From 5cc6009f0d4f5fcf19b4854c55659f8dca136cc2 Mon Sep 17 00:00:00 2001 From: Andrew Dalke Date: Fri, 26 May 2006 12:31:00 +0000 Subject: Test cases for off-by-one errors in string split with multicharacter pattern. --- Lib/test/string_tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 42a9400..3a97462 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) -- cgit v0.12