summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test/test_ttk/test_widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tkinter/test/test_ttk/test_widgets.py')
-rw-r--r--Lib/tkinter/test/test_ttk/test_widgets.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
index f5c0f17..c2231dc 100644
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -189,6 +189,14 @@ class ComboboxTest(unittest.TestCase):
self.combo.configure(values=[1, '', 2])
self.assertEqual(self.combo['values'], ('1', '', '2'))
+ # testing values with spaces
+ self.combo['values'] = ['a b', 'a\tb', 'a\nb']
+ self.assertEqual(self.combo['values'], ('a b', 'a\tb', 'a\nb'))
+
+ # testing values with special characters
+ self.combo['values'] = [r'a\tb', '"a"', '} {']
+ self.assertEqual(self.combo['values'], (r'a\tb', '"a"', '} {'))
+
# out of range
self.assertRaises(tkinter.TclError, self.combo.current,
len(self.combo['values']))