summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-02-28 17:46:23 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2006-02-28 17:46:23 (GMT)
commit7b03bade2b9fcb833043f2c2690fbc2de76290a7 (patch)
treebded946b9fc1caa7c0c9048bb26aae2782d87e39 /Lib
parentfb609f421568e53d05c979980f00455d2b5da820 (diff)
downloadcpython-7b03bade2b9fcb833043f2c2690fbc2de76290a7.zip
cpython-7b03bade2b9fcb833043f2c2690fbc2de76290a7.tar.gz
cpython-7b03bade2b9fcb833043f2c2690fbc2de76290a7.tar.bz2
Test case to cover subscription bug from SF 1333982
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/output/test_grammar1
-rw-r--r--Lib/test/test_grammar.py11
2 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/output/test_grammar b/Lib/test/output/test_grammar
index fed4197..4fa9cb0 100644
--- a/Lib/test/output/test_grammar
+++ b/Lib/test/output/test_grammar
@@ -55,6 +55,7 @@ multiplicative ops
unary ops
selectors
+[1, (1,), (1, 2), (1, 2, 3)]
atoms
classdef
['Apple', 'Banana', 'Coco nut']
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 0d2d925..b7c2a23 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -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