From ac52dfb290b2def674a44dcdd9d2a5744f435ba8 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 17 May 2016 20:36:00 +0000 Subject: 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 --- tests/scrollbar.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 { 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} -- cgit v0.12