Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b26454

Browse files
committed
Test more split argument combinations:
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
1 parent fb10c3f commit 8b26454

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/test/test_unicode.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ def test(method, input, output, *args):
6767
test('split', u'a b c d', [u'a b c d'], None, 0)
6868
test('split', u'a b c d', [u'a', u'b', u'c d'], None, 2)
6969
test('split', u'a b c d ', [u'a', u'b', u'c', u'd'])
70+
test('split', u'a//b//c//d', [u'a', u'b', u'c', u'd'], u'//')
71+
test('split', u'a//b//c//d', [u'a', u'b', u'c', u'd'], '//')
72+
test('split', 'a//b//c//d', [u'a', u'b', u'c', u'd'], u'//')
73+
test('split', u'endcase test', [u'endcase ', u''], u'test')
74+
test('split', u'endcase test', [u'endcase ', u''], 'test')
75+
test('split', 'endcase test', [u'endcase ', u''], u'test')
76+
7077

7178
# join now works with any sequence type
7279
class Sequence:

0 commit comments

Comments
 (0)