tests/basics/string_rsplit: Add tests for negative "maxsplit" argument.

This commit is contained in:
Damien George 2017-06-02 13:08:18 +10:00
parent 9f85c4fe48
commit 7400d88762

View File

@ -52,3 +52,7 @@ print("/*10/*11/*12/*".rsplit("/*", 4))
print("/*10/*11/*12/*".rsplit("/*", 5))
print(b"abcabc".rsplit(b"bc", 2))
# negative "maxsplit" should delegate to .split()
print('abaca'.rsplit('a', -1))
print('abaca'.rsplit('a', -2))