diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-10 08:07:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-10 08:07:06 (GMT) |
commit | 56de2058b0be5410f7b9f6c913c1a70b418137a6 (patch) | |
tree | eb6d54a0f82fb37b5d47caebf727623f1250fe72 /tests | |
parent | df640a1dfa81b087de3bc53f2b4c4b2388d3d8da (diff) | |
download | tk-56de2058b0be5410f7b9f6c913c1a70b418137a6.zip tk-56de2058b0be5410f7b9f6c913c1a70b418137a6.tar.gz tk-56de2058b0be5410f7b9f6c913c1a70b418137a6.tar.bz2 |
Change a few "update idletask" from previous commit back to "update". Other platforms most likely need it this way.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/canvImg.test | 14 | ||||
-rw-r--r-- | tests/image.test | 12 | ||||
-rw-r--r-- | tests/listbox.test | 30 |
3 files changed, 32 insertions, 24 deletions
diff --git a/tests/canvImg.test b/tests/canvImg.test index 51c8d43..aa6781d 100644 --- a/tests/canvImg.test +++ b/tests/canvImg.test @@ -739,12 +739,12 @@ test canvImg-10.1 {TranslateImage procedure} -constraints testImageType -setup { } -body { image create test foo -variable x .c create image 50 100 -image foo -tags image -anchor nw - update idletasks + update set x {} foo changed 2 4 6 8 30 15 # macOS Catalina needs a delay here. after 20 - update idletasks + update return $x } -cleanup { .c delete all @@ -757,12 +757,12 @@ test canvImg-11.1 {TranslateImage procedure} -constraints testImageType -setup { } -body { image create test foo -variable x .c create image 50 100 -image foo -tags image -anchor nw - update idletasks + update set x {} foo changed 2 4 6 8 40 50 # macOS Catalina needs a delay here. after 20 - update idletasks + update return $x } -cleanup { .c delete all @@ -775,7 +775,7 @@ test canvImg-11.2 {ImageChangedProc procedure} -constraints { } -body { image create test foo -variable x .c create image 50 100 -image foo -tags image -anchor center - update idletasks + update set x {} foo changed 0 0 0 0 40 50 .c bbox image @@ -802,12 +802,12 @@ test canvImg-11.3 {ImageChangedProc procedure} -constraints { .c create image 50 100 -image foo -tags image -anchor nw .c create image 70 110 -image foo2 -anchor nw - update idletasks + update set y {} image create test foo -variable x # macOS Catalina needs a delay here. after 20 - update idletasks + update return $y } -cleanup { .c delete all diff --git a/tests/image.test b/tests/image.test index 70c3f72..6d51e51 100644 --- a/tests/image.test +++ b/tests/image.test @@ -88,12 +88,12 @@ test image-1.8 {Tk_ImageCmd procedure, "create" option} -constraints { .c create image 100 50 -image myimage .c create image 100 150 -image myimage image delete myimage - update idletasks + update set x {} image create test myimage -variable x # macOS Catalina needs a delay here. after 20 - update idletasks + update return $x } -cleanup { .c delete all @@ -400,13 +400,13 @@ test image-9.2 {Tk_ImageChanged procedure} -constraints testImageType -setup { image create test foo -variable x .c create image 50 50 -image foo .c create image 90 100 -image foo - update idletasks + update set x {} foo changed 5 6 7 8 30 15 image create test myimage -variable x # macOS Catalina needs a delay here. after 20 - update idletasks + update return $x } -cleanup { .c delete all @@ -442,11 +442,11 @@ test image-11.1 {Tk_FreeImage procedure} -constraints testImageType -setup { .c create image 50 50 -image foo -tags i1 .c create image 90 100 -image foo -tags i2 pack forget .c - update idletasks + update set x {} .c delete i1 pack .c - update idletasks + update # macOS Catalina needs a delay here. after 20 list [imageNames] $x diff --git a/tests/listbox.test b/tests/listbox.test index 44b7f83..14c5c97 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -2209,13 +2209,13 @@ test listbox-11.5 {ChangeListboxView procedure} -setup { } -body { listbox .l -height 5 -yscrollcommand "record y" pack .l - update idletasks + update .l insert 0 a b c d e f g h i j .l yview 3 - update idletasks + update set log {} .l yview 3 - update idletasks + update list [format {%.6g %.6g} {*}[.l yview]] $log } -cleanup { destroy .l @@ -2666,6 +2666,7 @@ test listbox-21.9 {ListboxListVarProc, test hscrollbar after listvar mod} -setup listbox .l -font $fixed -width 10 -xscrollcommand "record x" -listvar x set log {} pack .l + set timeout [after 500 {set log timeout}] vwait log lappend x "0000000000" update @@ -2674,6 +2675,7 @@ test listbox-21.9 {ListboxListVarProc, test hscrollbar after listvar mod} -setup set log } -cleanup { destroy .l + after cancel $timeout } -result [list {x 0 1} {x 0 1} {x 0 0.5}] test listbox-21.10 {ListboxListVarProc, test hscrollbar after listvar mod} -setup { destroy .l @@ -2682,16 +2684,18 @@ test listbox-21.10 {ListboxListVarProc, test hscrollbar after listvar mod} -setu listbox .l -font $fixed -width 10 -xscrollcommand "record x" -listvar x set log {} pack .l + set timeout [after 500 {set log timeout}] vwait log lappend x "0000000000" - update idletasks + update lappend x "00000000000000000000" - update idletasks + update set x [list "0000000000"] - update idletasks + update set log } -cleanup { destroy .l + after cancel timeout } -result [list {x 0 1} {x 0 1} {x 0 0.5} {x 0 1}] test listbox-21.11 {ListboxListVarProc, bad list} -setup { destroy .l @@ -2757,16 +2761,18 @@ test listbox-21.15 {ListboxListVarProc, update vertical scrollbar} -setup { } -body { catch {unset x} listbox .l -font $fixed -height 3 -yscrollcommand "record y" -listvar x - update idletasks + update set log {} pack .l + set timeout [after 500 {set log timeout}] vwait log - update idletasks + update lappend x a b c d e f vwait log set log } -cleanup { destroy .l + after cancel $timeout } -result [list {y 0 1} {y 0 0.5}] test listbox-21.16 {ListboxListVarProc, update vertical scrollbar} -setup { destroy .l @@ -2776,13 +2782,13 @@ test listbox-21.16 {ListboxListVarProc, update vertical scrollbar} -setup { pack .l set x [list 0 1 2 3 4 5] .l yview scroll 3 units - update idletasks + update set result {} lappend result [format {%.6g %.6g} {*}[.l yview]] set x [lreplace $x 3 3] set x [lreplace $x 3 3] set x [lreplace $x 3 3] - update idletasks + update lappend result [format {%.6g %.6g} {*}[.l yview]] set result } -cleanup { @@ -2797,14 +2803,16 @@ test listbox-22.1 {UpdateHScrollbar} -setup { listbox .l -font $fixed -width 10 -xscrollcommand "record x" set log {} pack .l + set timeout [after 500 {set log timeout}] vwait log .l insert end "0000000000" - update idletasks + update .l insert end "00000000000000000000" vwait log set log } -cleanup { destroy .l + after cancel $timeout } -result [list {x 0 1} {x 0 1} {x 0 0.5}] |