diff options
author | fvogel <fvogelnew1@free.fr> | 2016-05-02 20:45:41 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-05-02 20:45:41 (GMT) |
commit | b2ff07fb0fc3416346f580e622f90ea29201385c (patch) | |
tree | 2b86255a612951fc89a01331140b9a7f9dadbc04 /tests | |
parent | 8e54028cd0cc982f8274f29b7aa6072967553831 (diff) | |
download | tk-b2ff07fb0fc3416346f580e622f90ea29201385c.zip tk-b2ff07fb0fc3416346f580e622f90ea29201385c.tar.gz tk-b2ff07fb0fc3416346f580e622f90ea29201385c.tar.bz2 |
Added test button-14.1 to guard against regressions regarding [011706ec42]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/button.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/button.test b/tests/button.test index 6d924f6..05f463c 100644 --- a/tests/button.test +++ b/tests/button.test @@ -3908,6 +3908,25 @@ test button-13.8 {size behavior: checkbutton} -setup { destroy .a .b .c } -result {1 1 1} +test button-14.1 {bug fix: [011706ec42] tk::ButtonInvoke unsafe wrt widget destruction} -body { + proc destroy_button {} { + if {[winfo exists .top.b]} { + destroy .top.b + puts destroyed + } + } + toplevel .top + button .top.b -text Foo -command destroy_button + bind .top.b <space> destroy_button + pack .top.b + focus -force .top.b + update + event generate .top.b <space> + update ; # shall not trigger error invalid command name ".top.b" +} -cleanup { + destroy .top.b .top +} -result {} + imageFinish cleanupTests return |