Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
empty string or tuple argument.
On some platforms Tcl memory allocator returns NULL when allocating zero-sized
block of memory.
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index d627034..5836989 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -429,7 +429,6 @@
self.assertEqual(passValue((1, '2', (3.4,))),
(1, '2', (3.4,)) if self.wantobjects else '1 2 3.4')
- @unittest.skipIf(sys.platform.startswith("aix"), 'Issue #21951: crashes on AIX')
def test_user_command(self):
result = []
def testfunc(arg):
@@ -456,9 +455,11 @@
check('string')
check('string\xbd')
check('string\xe2\x82\xac', u'string\u20ac')
+ check('')
check(u'string')
check(u'string\xbd')
check(u'string\u20ac')
+ check(u'')
check('str\xc0\x80ing', u'str\x00ing')
check('str\xc0\x80ing\xe2\x82\xac', u'str\x00ing\u20ac')
check(u'str\x00ing')