summaryrefslogtreecommitdiffstats
path: root/tests/ttk
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-05-25 19:36:21 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-05-25 19:36:21 (GMT)
commitb03ce9960743ca1b27876129d6eb5ae3e8c978c2 (patch)
tree39ad7f79f0681e3b934d7595415c6db968618e2c /tests/ttk
parentb16455219c1d8d926e0d2c7c21bab77f5f3cdeca (diff)
parent6c5b3df17c8246d38c607d370b95043996edce84 (diff)
downloadtk-b03ce9960743ca1b27876129d6eb5ae3e8c978c2.zip
tk-b03ce9960743ca1b27876129d6eb5ae3e8c978c2.tar.gz
tk-b03ce9960743ca1b27876129d6eb5ae3e8c978c2.tar.bz2
Fixed [109865fa01] - ttk::menubutton unsafe wrt widget destruction
Diffstat (limited to 'tests/ttk')
-rw-r--r--tests/ttk/checkbutton.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ttk/checkbutton.test b/tests/ttk/checkbutton.test
index e18ff32..6b79287 100644
--- a/tests/ttk/checkbutton.test
+++ b/tests/ttk/checkbutton.test
@@ -45,4 +45,20 @@ test checkbutton-1.6 "Checkbutton default variable" -body {
lappend result [info exists .cb] [set .cb] [.cb state]
} -result [list .cb 0 alternate 1 on selected 1 off {}]
+# Bug [109865fa01]
+test checkbutton-1.7 "Button destroyed by click" -body {
+ proc destroy_button {} {
+ destroy .top
+ }
+ toplevel .top
+ ttk::menubutton .top.mb -text Button -style TLabel
+ bind .top.mb <ButtonRelease-1> destroy_button
+ pack .top.mb
+ focus -force .top.mb
+ update
+ event generate .top.mb <1>
+ event generate .top.mb <ButtonRelease-1>
+ update ; # shall not trigger error invalid command name ".top.b"
+} -result {}
+
tcltest::cleanupTests