summaryrefslogtreecommitdiff
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-05-30 14:25:22 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2014-05-30 14:25:22 +0300
commita79f9c59be2095eca5247564a834d084842b8190 (patch)
tree9636cf5de85962c2d91574fa5fd25135f4816d35 /Lib/test/test_tcl.py
parent43ad445d759579a28224704f6cb13d578f5bdc5a (diff)
parent854e51710d580eed783814f4509bb162271ac370 (diff)
downloadcpython-a79f9c59be2095eca5247564a834d084842b8190.tar.gz
Issue #21552: Fixed possible integer overflow of too long string lengths in
the tkinter module on 64-bit platforms.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index b0b2729b62..db655669f5 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -412,6 +412,8 @@ class TclTest(unittest.TestCase):
self.assertEqual(float(passValue(-float('inf'))), -float('inf'))
self.assertEqual(passValue((1, '2', (3.4,))),
(1, '2', (3.4,)) if self.wantobjects else '1 2 3.4')
+ self.assertEqual(passValue(['a', ['b', 'c']]),
+ ('a', ('b', 'c')) if self.wantobjects else 'a {b c}')
def test_user_command(self):
result = None
@@ -459,6 +461,7 @@ class TclTest(unittest.TestCase):
check(float('nan'), 'NaN', eq=nan_eq)
check((), '')
check((1, (2,), (3, 4), '5 6', ()), '1 2 {3 4} {5 6} {}')
+ check([1, [2,], [3, 4], '5 6', []], '1 2 {3 4} {5 6} {}')
def test_splitlist(self):
splitlist = self.interp.tk.splitlist
@@ -484,6 +487,8 @@ class TclTest(unittest.TestCase):
('a 3.4', ('a', '3.4')),
(('a', 3.4), ('a', 3.4)),
((), ()),
+ ([], ()),
+ (['a', ['b', 'c']], ('a', ['b', 'c'])),
(call('list', 1, '2', (3.4,)),
(1, '2', (3.4,)) if self.wantobjects else
('1', '2', '3.4')),
@@ -531,6 +536,9 @@ class TclTest(unittest.TestCase):
(('a', 3.4), ('a', 3.4)),
(('a', (2, 3.4)), ('a', (2, 3.4))),
((), ()),
+ ([], ()),
+ (['a', 'b c'], ('a', ('b', 'c'))),
+ (['a', ['b', 'c']], ('a', ('b', 'c'))),
(call('list', 1, '2', (3.4,)),
(1, '2', (3.4,)) if self.wantobjects else
('1', '2', '3.4')),