Skip to content

Commit 7400d88

Browse files
committed
tests/basics/string_rsplit: Add tests for negative "maxsplit" argument.
1 parent 9f85c4f commit 7400d88

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/basics/string_rsplit.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@
5252
print("/*10/*11/*12/*".rsplit("/*", 5))
5353

5454
print(b"abcabc".rsplit(b"bc", 2))
55+
56+
# negative "maxsplit" should delegate to .split()
57+
print('abaca'.rsplit('a', -1))
58+
print('abaca'.rsplit('a', -2))

0 commit comments

Comments
 (0)