diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scrollbar.test | 18 |
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} |