diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/entry.test | 1 | ||||
-rw-r--r-- | tests/font.test | 6 | ||||
-rw-r--r-- | tests/scale.test | 2 | ||||
-rw-r--r-- | tests/textWind.test | 28 | ||||
-rw-r--r-- | tests/unixEmbed.test | 1 |
5 files changed, 25 insertions, 13 deletions
diff --git a/tests/entry.test b/tests/entry.test index aef509c..1b589d1 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -2995,6 +2995,7 @@ test entry-17.2 {EntryUpdateScrollbar procedure} -body { test entry-17.3 {EntryUpdateScrollbar procedure} -body { entry .e -width 10 -xscrollcommand scroll -font {Courier -12} pack .e + update idletasks set timeout [after 500 {set scrollInfo {-1000000 -1000000}}] .e insert 0 abcdefghijklmnopqrs .e xview 6 diff --git a/tests/font.test b/tests/font.test index d490c64..8dce1f8 100644 --- a/tests/font.test +++ b/tests/font.test @@ -523,16 +523,16 @@ test font-12.2 {UpdateDependantFonts procedure: pings the widgets} -setup { destroy .t.f catch {font delete xyz} pack [label .t.f] - update + update idletasks } -body { font create xyz -family times -size 20 .t.f config -font xyz -text "abcd" -padx 0 -bd 0 -highlightthickness 0 set a1 [font measure xyz "abcd"] - update + update idletasks set b1 [winfo reqwidth .t.f] font configure xyz -family helvetica -size 20 set a2 [font measure xyz "abcd"] - update + update idletasks set b2 [winfo reqwidth .t.f] expr {$a1==$b1 && $a2==$b2} } -cleanup { diff --git a/tests/scale.test b/tests/scale.test index 9c1ab21..69ef0d9 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -1522,6 +1522,7 @@ test scale-20.7 {Bug [2262543fff] - Scale widget unexpectedly fires command call } -body { scale .s -from 1 -to 50 -command {set commandedVar} pack .s + update idletasks .s set 10 set timeout [after 500 {set $commandedVar "timeout"}] vwait commandedVar ; # -command callback shall fire @@ -1538,6 +1539,7 @@ test scale-20.8 {Bug [2262543fff] - Scale widget unexpectedly fires command call } -body { scale .s -from 1 -to 50 -variable scaleVar -command {set commandedVar} pack .s + update idletasks .s set 10 set timeout [after 500 {set $commandedVar "timeout"}] vwait commandedVar ; # -command callback shall fire diff --git a/tests/textWind.test b/tests/textWind.test index 55128be..a93febd 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} diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test index ea0063f..d4f7259 100644 --- a/tests/unixEmbed.test +++ b/tests/unixEmbed.test @@ -1301,6 +1301,7 @@ test unixEmbed-11.2 {mouse coordinates in embedded toplevels} -constraints { wm geometry .main 200x400+100+100 update idletasks focus -force .main + after 100 set x [expr {[winfo x .main ] + [winfo x .main.b] + 40}] set y [expr {[winfo y .main ] + [winfo y .main.b] + 38}] lappend result [winfo containing $x $y] |