diff options
author | Andrew Dalke <dalke@dalkescientific.com> | 2006-05-26 12:31:00 (GMT) |
---|---|---|
committer | Andrew Dalke <dalke@dalkescientific.com> | 2006-05-26 12:31:00 (GMT) |
commit | 5cc6009f0d4f5fcf19b4854c55659f8dca136cc2 (patch) | |
tree | d06e921dd1f340da0d0f97515bf8a2c199c4c404 /Lib/test/string_tests.py | |
parent | 005aee2c39f6c717d7c4766e68fddb00875fda2f (diff) | |
download | cpython-5cc6009f0d4f5fcf19b4854c55659f8dca136cc2.zip cpython-5cc6009f0d4f5fcf19b4854c55659f8dca136cc2.tar.gz cpython-5cc6009f0d4f5fcf19b4854c55659f8dca136cc2.tar.bz2 |
Test cases for off-by-one errors in string split with multicharacter pattern.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r-- | Lib/test/string_tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
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) |