diff options
Diffstat (limited to 'tests/textWind.test')
-rw-r--r-- | tests/textWind.test | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/tests/textWind.test b/tests/textWind.test index a11a418..1329790 100644 --- a/tests/textWind.test +++ b/tests/textWind.test @@ -1541,26 +1541,34 @@ test textWind-17.9 {peer widget window configuration} -setup { test textWind-17.10 {peer widget window configuration} -setup { destroy .t .tt } -body { + set res {} pack [text .t] .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] + update idletasks .t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue] + update idletasks + # There should be a window in the main widget but not in the peer. + lappend res [.t window configure 1.2 -window] + lappend res [.tt.t window configure 1.2 -window] .tt.t window create 1.2 -window [frame .tt.t.f -width 25 -height 20 -bg blue] - update ; update - .t window configure 1.2 -create \ - {destroy %W.f ; frame %W.f -width 50 -height 7 -bg red} - .tt.t window configure 1.2 -window {} + update idletasks + .t window configure 1.2 -create {destroy %W.f ; frame %W.f -width 50 -height 7 -bg red} + update idletasks + # The main widget should not have changed. + lappend res [.t window configure 1.2 -window] .t window configure 1.2 -window {} - set res [list [.t window configure 1.2 -window] \ - [.tt.t window configure 1.2 -window]] - update - lappend res [.t window configure 1.2 -window] \ - [.tt.t window configure 1.2 -window] + .tt.t window configure 1.2 -window {} + update idletasks + # Nothing should have changed. + lappend res [.t window configure 1.2 -window] + lappend res [.tt.t window configure 1.2 -window] } -cleanup { destroy .tt .t -} -result {{-window {} {} {} {}} {-window {} {} {} {}} {-window {} {} {} .t.f} {-window {} {} {} .tt.t.f}} +} -result {{-window {} {} {} .t.f} {-window {} {} {} {}} {-window {} {} {} .t.f}\ +{-window {} {} {} .t.f} {-window {} {} {} .tt.t.f}} test textWind-18.1 {embedded window deletion triggered by a script bound to <Map>} -setup { catch {destroy .t .f .f2} |