summaryrefslogtreecommitdiff
path: root/Lib/test/test_grammar.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-02-28 17:46:23 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2006-02-28 17:46:23 +0000
commitaeeee64701539be514fc6f58df99f8e93bd75ced (patch)
tree0e91f4f870c1a13b213801e98d11fb0f70be9ef8 /Lib/test/test_grammar.py
parentea336c3af6a5f604090934932a63512d8bcdbf21 (diff)
downloadcpython-aeeee64701539be514fc6f58df99f8e93bd75ced.tar.gz
Test case to cover subscription bug from SF 1333982
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r--Lib/test/test_grammar.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 0d2d9255df..b7c2a23637 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