]> granicus.if.org Git - python/commitdiff
Test more split argument combinations:
authorGuido van Rossum <guido@python.org>
Tue, 19 Dec 2000 02:22:31 +0000 (02:22 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 19 Dec 2000 02:22:31 +0000 (02:22 +0000)
1) multi-char separator
2) multi-char separator that only occurs at last position
3) all of the above with mixed Unicode and 8-bit-string arguments

Lib/test/test_unicode.py

index 5f79101651431083226266f7f1abbf4c76b1053f..05aecd87b67516b58200f36059b7b40646b6cb62 100644 (file)
@@ -67,6 +67,13 @@ test('split', u'a b c d', [u'a', u'b', u'c', u'd'], None, 4)
 test('split', u'a b c d', [u'a b c d'], None, 0)
 test('split', u'a  b  c  d', [u'a', u'b', u'c  d'], None, 2)
 test('split', u'a b c d ', [u'a', u'b', u'c', u'd'])
+test('split', u'a//b//c//d', [u'a', u'b', u'c', u'd'], u'//')
+test('split', u'a//b//c//d', [u'a', u'b', u'c', u'd'], '//')
+test('split', 'a//b//c//d', [u'a', u'b', u'c', u'd'], u'//')
+test('split', u'endcase test', [u'endcase ', u''], u'test')
+test('split', u'endcase test', [u'endcase ', u''], 'test')
+test('split', 'endcase test', [u'endcase ', u''], u'test')
+
 
 # join now works with any sequence type
 class Sequence: