From 2df03c765cf8b22cf3ed085b2f5c5ddaf7b60ab3 Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 9 Mar 2022 21:36:33 +0000 Subject: Add test canvWind-2.1 demonstrating bug [5412c64a79] --- tests/canvWind.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/canvWind.test b/tests/canvWind.test index 436ee2c..9777427 100644 --- a/tests/canvWind.test +++ b/tests/canvWind.test @@ -139,6 +139,22 @@ test canvWind-1.4 {DisplayWinItem, windows off-screen horizontally} -setup { destroy .t } -result {{1 3} {1 -79} {0 -79} {1 255} {0 255}} +test canvWind-2.1 {DisplayWinItem, window gets destroyed duing } -setup { + destroy .t +} -body { + toplevel .t + canvas .t.c + pack .t.c + frame .t.c.f -width 50 -height 50 -background red + set id [.t.c create window 50 50 -window .t.c.f] + update + bind .t.c.f {destroy .t.c.f} + .t.c coords $id 60 60 ; # crashes! + update +} -cleanup { + destroy .t +} -result {} + # cleanup cleanupTests return -- cgit v0.12