summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-05-17 20:36:00 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-05-17 20:36:00 (GMT)
commitac52dfb290b2def674a44dcdd9d2a5744f435ba8 (patch)
treed5c13f13e509f6eac8760fccdc844db79b2e8a8e /tests
parentb9aa9a5d2da795de9a7bad7448cc5af7c2c8dd86 (diff)
downloadtk-ac52dfb290b2def674a44dcdd9d2a5744f435ba8.zip
tk-ac52dfb290b2def674a44dcdd9d2a5744f435ba8.tar.gz
tk-ac52dfb290b2def674a44dcdd9d2a5744f435ba8.tar.bz2
Added (currently failing) test case scrollbar-11.1 - Note that it will only fail on x11 and on aqua, not on Win because on Windows there is no binding of <2> for the Scrollbar class
Diffstat (limited to 'tests')
-rw-r--r--tests/scrollbar.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 3b16821..8f967ea 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -662,6 +662,24 @@ test scrollbar-10.2 {<MouseWheel> event on scrollbar} -constraints {win|unix} -s
destroy .t .s
} -result {1.4}
+test scrollbar-11.1 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destruction} -body {
+ proc destroy_scrollbar {} {
+ if {[winfo exists .top.s]} {
+ destroy .top.s
+ }
+ }
+ toplevel .top
+ scrollbar .top.s -command destroy_scrollbar
+ bind .top.s <2> destroy_scrollbar
+ pack .top.s
+ focus -force .top.s
+ update
+ event generate .top.s <2>
+ update ; # shall not trigger error invalid command name ".top.s"
+} -cleanup {
+ destroy .top.s .top
+} -result {}
+
catch {destroy .s}
catch {destroy .t}