[Python-checkins] r46352 - python/trunk/Lib/test/string_tests.py

andrew.dalke python-checkins at python.org
Fri May 26 18:22:53 CEST 2006


Author: andrew.dalke
Date: Fri May 26 18:22:52 2006
New Revision: 46352

Modified:
   python/trunk/Lib/test/string_tests.py
Log:
Test for more edge strip cases; leading and trailing separator gets removed
even with strip(..., 0)


Modified: python/trunk/Lib/test/string_tests.py
==============================================================================
--- python/trunk/Lib/test/string_tests.py	(original)
+++ python/trunk/Lib/test/string_tests.py	Fri May 26 18:22:52 2006
@@ -246,6 +246,7 @@
         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 @@
         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')


More information about the Python-checkins mailing list