summaryrefslogtreecommitdiff
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 260b2d83d9..8f16f20e56 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -246,6 +246,13 @@ class CommonTest(unittest.TestCase):
self.checkequal(['a b c d'], 'a b c d', 'split', None, 0)
self.checkequal(['a', 'b', 'c d'], 'a b c d', 'split', None, 2)
+ self.checkequal([], ' ', 'split')
+ self.checkequal(['a'], ' a ', 'split')
+ self.checkequal(['a', 'b'], ' a b ', 'split')
+ self.checkequal(['a', 'b '], ' a b ', 'split', None, 1)
+ self.checkequal(['a', 'b c '], ' a b c ', 'split', None, 1)
+ self.checkequal(['a', 'b', 'c '], ' a b c ', 'split', None, 2)
+
# by a char
self.checkequal(['a', 'b', 'c', 'd'], 'a|b|c|d', 'split', '|')
self.checkequal(['a', 'b|c|d'], 'a|b|c|d', 'split', '|', 1)