tests/basics/list_slice_3arg: Add more tests for negative slicing.
This commit is contained in:
parent
eb4c37f7a4
commit
e1b0f2a16f
|
@ -26,3 +26,14 @@ print(x[-1:-1:-1])
|
|||
print(x[-1:-2:-1])
|
||||
print(x[-1:-11:-1])
|
||||
print(x[-10:-11:-1])
|
||||
print(x[:-15:-1])
|
||||
|
||||
# test negative indices that are out-of-bounds
|
||||
print([][::-1])
|
||||
print([1][::-1])
|
||||
print([][0:-10:-1])
|
||||
print([1][0:-10:-1])
|
||||
print([][:-20:-1])
|
||||
print([1][:-20:-1])
|
||||
print([][-20::-1])
|
||||
print([1][-20::-1])
|
||||
|
|
Loading…
Reference in New Issue