Unbreak string slice test by just switching to normal (not byte) strings.

This commit is contained in:
Paul Sokolovsky 2014-01-04 19:12:05 +02:00
parent 21dfb55dad
commit 9464cde3c9
2 changed files with 32 additions and 32 deletions

View File

@ -1,32 +0,0 @@
print(b"123"[0:1])
print(b"123"[0:2])
print(b"123"[:1])
print(b"123"[1:])
# Idiom for copying sequence
print(b"123"[:])
print(b"123"[:-1])
# Weird cases
print(b"123"[0:0])
print(b"123"[1:0])
print(b"123"[1:1])
print(b"123"[-1:-1])
print(b"123"[-3:])
print(b"123"[-3:3])
print(b"123"[0:])
print(b"123"[:0])
print(b"123"[:-3])
print(b"123"[:-4])
# Range check testing, don't segfault, please ;-)
print(b"123"[:1000000])
print(b"123"[1000000:])
print(b"123"[:-1000000])
print(b"123"[-1000000:])
# No IndexError!
print(b""[1:1])
print(b""[-1:-1])

View File

@ -0,0 +1,32 @@
print("123"[0:1])
print("123"[0:2])
print("123"[:1])
print("123"[1:])
# Idiom for copying sequence
print("123"[:])
print("123"[:-1])
# Weird cases
print("123"[0:0])
print("123"[1:0])
print("123"[1:1])
print("123"[-1:-1])
print("123"[-3:])
print("123"[-3:3])
print("123"[0:])
print("123"[:0])
print("123"[:-3])
print("123"[:-4])
# Range check testing, don't segfault, please ;-)
print("123"[:1000000])
print("123"[1000000:])
print("123"[:-1000000])
print("123"[-1000000:])
# No IndexError!
print(""[1:1])
print(""[-1:-1])