Test case to cover subscription bug from SF 1333982

This commit is contained in:
Jeremy Hylton 2006-02-28 17:46:23 +00:00
parent fb609f4215
commit 7b03bade2b
2 changed files with 12 additions and 0 deletions

View File

@ -55,6 +55,7 @@ multiplicative ops
unary ops
selectors
[1, (1,), (1, 2), (1, 2, 3)]
atoms
classdef
['Apple', 'Banana', 'Coco nut']

View File

@ -663,6 +663,17 @@ s = a[:]
s = a[-5:]
s = a[:-1]
s = a[-4:-3]
# A rough test of SF bug XXX.
# The testing here is fairly incomplete.
d = {}
d[1] = 1
d[1,] = 2
d[1,2] = 3
d[1,2,3] = 4
L = list(d)
L.sort()
print L
print 'atoms'
### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING