From 3a509540d384f5f707a39987642f1f111e4bf657 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 11 May 2019 20:36:25 +0000 Subject: Tests for Ticket [5d991b822e]. --- tests/button.test | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/button.test b/tests/button.test index d4db317..21ccf8f 100644 --- a/tests/button.test +++ b/tests/button.test @@ -3958,6 +3958,33 @@ test button-14.1 {bug fix: [011706ec42] tk::ButtonInvoke unsafe wrt widget destr destroy .top.b .top } -result {} +test button-15.1 {Bug [5d991b822e]} { + # Want this not to segfault + set var INIT + button .b -textvariable var + trace add variable var unset {apply {args { + .b configure -textvariable {} + }}} + pack .b + bind .b {unset var} + update + destroy .b +} {} +test button-15.2 {Bug [5d991b822e]} { + # Want this not to leak traces + set var INIT + button .b -textvariable var + trace add variable var unset {apply {args { + .b configure -textvariable new + }}} + pack .b + bind .b {unset var} + update + destroy .b + unset new +} {} + + imageFinish cleanupTests return -- cgit v0.12