tests/basics/string_rsplit: Add tests for negative "maxsplit" argument.
This commit is contained in:
parent
9f85c4fe48
commit
7400d88762
|
@ -52,3 +52,7 @@ print("/*10/*11/*12/*".rsplit("/*", 4))
|
||||||
print("/*10/*11/*12/*".rsplit("/*", 5))
|
print("/*10/*11/*12/*".rsplit("/*", 5))
|
||||||
|
|
||||||
print(b"abcabc".rsplit(b"bc", 2))
|
print(b"abcabc".rsplit(b"bc", 2))
|
||||||
|
|
||||||
|
# negative "maxsplit" should delegate to .split()
|
||||||
|
print('abaca'.rsplit('a', -1))
|
||||||
|
print('abaca'.rsplit('a', -2))
|
||||||
|
|
Loading…
Reference in New Issue