tests/basics/builtin_range: Add test for corner case of range slicing.

This commit is contained in:
Damien George 2017-11-24 15:30:12 +11:00
parent 505671b698
commit c7a0e1472d
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ print(range(1, 100, 5)[15:5:-3])
print(range(100, 1, -5)[5:15:3])
print(range(100, 1, -5)[15:5:-3])
# for this case uPy gives a different stop value but the listed elements are still correct
print(list(range(7, -2, -4)[2:-2:]))
# zero step
try:
range(1, 2, 0)