Test cases for off-by-one errors in string split with multicharacter pattern.

This commit is contained in:
Andrew Dalke 2006-05-26 12:31:00 +00:00
parent 005aee2c39
commit 5cc6009f0d
1 changed files with 2 additions and 0 deletions

View File

@ -297,6 +297,8 @@ class CommonTest(unittest.TestCase):
self.checkequal(['aaaa'], 'aaaa', 'split', 'aab') self.checkequal(['aaaa'], 'aaaa', 'split', 'aab')
self.checkequal([''], '', 'split', 'aaa') self.checkequal([''], '', 'split', 'aaa')
self.checkequal(['aa'], 'aa', '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')
self.checkequal(['a']*20, ('aBLAH'*20)[:-4], 'split', 'BLAH', 19) self.checkequal(['a']*20, ('aBLAH'*20)[:-4], 'split', 'BLAH', 19)