From 725fe4089d74f208bb820b967fd54cd982d1a26b Mon Sep 17 00:00:00 2001 From: Andrew Dalke Date: Fri, 26 May 2006 16:22:52 +0000 Subject: Test for more edge strip cases; leading and trailing separator gets removed even with strip(..., 0) --- 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 2469830..e242170 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -246,6 +246,7 @@ class CommonTest(unittest.TestCase): self.checkequal(['a', 'b', 'c', 'd'], 'a b c d', 'split', None, sys.maxint-1) 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, 0) self.checkequal(['a', 'b', 'c d'], 'a b c d', 'split', None, 2) self.checkequal([], ' ', 'split') @@ -332,6 +333,7 @@ class CommonTest(unittest.TestCase): self.checkequal(['a', 'b', 'c', 'd'], 'a b c d', 'rsplit', None, sys.maxint-20) self.checkequal(['a b c d'], 'a b c d', 'rsplit', None, 0) + self.checkequal(['a b c d'], 'a b c d ', 'rsplit', None, 0) self.checkequal(['a b', 'c', 'd'], 'a b c d', 'rsplit', None, 2) self.checkequal([], ' ', 'rsplit') -- cgit v0.12