]> granicus.if.org Git - python/commitdiff
Added strop.split tests when sep is None.
authorBarry Warsaw <barry@python.org>
Tue, 2 Dec 1997 00:30:04 +0000 (00:30 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 2 Dec 1997 00:30:04 +0000 (00:30 +0000)
Lib/test/test_strop.py

index 9243ff48ef011b1be5f543ac3441e6d7aae88d76..a4f18828e7430febd687c712ee3aa8df698ac56b 100644 (file)
@@ -45,6 +45,12 @@ test('split', 'this is the split function',
      ['this', 'is', 'the', 'split', 'function'])
 test('split', 'a|b|c|d', ['a', 'b', 'c', 'd'], '|')
 test('split', 'a|b|c|d', ['a', 'b', 'c|d'], '|', 2)
+test('split', 'a b c d', ['a', 'b c d'], None, 1)
+test('split', 'a b c d', ['a', 'b', 'c d'], None, 2)
+test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 3)
+test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 4)
+test('split', 'a b c d', ['a', 'b', 'c', 'd'], None, 0)
+test('split', 'a  b  c  d', ['a', 'b', 'c  d'], None, 2)
 
 # join now works with any sequence type
 class Sequence: