tests/basics/list_slice_3arg: Add more tests for negative slicing.

This commit is contained in:
Damien George 2017-05-17 16:33:57 +10:00
parent eb4c37f7a4
commit e1b0f2a16f
1 changed files with 11 additions and 0 deletions

View File

@ -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])