diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-08-19 16:42:27 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-08-19 16:42:27 (GMT) |
commit | 10faa132df0677d6fb353c0cabb1191c58c90f45 (patch) | |
tree | a9596b5d4e3c4e4cfbb11c3f13262864741acec4 /tests/listbox.test | |
parent | d83dea17ecb2f74e3048b02992ce5e9c30573b12 (diff) | |
parent | b8d4e367489fb78a2cbbd2d78fe5aba4403e31f6 (diff) | |
download | tk-10faa132df0677d6fb353c0cabb1191c58c90f45.zip tk-10faa132df0677d6fb353c0cabb1191c58c90f45.tar.gz tk-10faa132df0677d6fb353c0cabb1191c58c90f45.tar.bz2 |
Merge 8.7
Diffstat (limited to 'tests/listbox.test')
-rw-r--r-- | tests/listbox.test | 49 |
1 files changed, 20 insertions, 29 deletions
diff --git a/tests/listbox.test b/tests/listbox.test index 730b5f4..efd5f46 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -587,7 +587,7 @@ test listbox-3.36 {ListboxWidgetCmd procedure, "delete" option} -setup { } -body { listbox .l2 .l2 insert 0 el0 el1 el2 el3 el4 el5 el6 el7 - .l2 delete 0 2 + .l2 delete -1 2 .l2 get 0 end } -cleanup { destroy .l2 @@ -597,7 +597,7 @@ test listbox-3.37 {ListboxWidgetCmd procedure, "delete" option} -setup { } -body { listbox .l2 .l2 insert 0 el0 el1 el2 el3 el4 el5 el6 el7 - .l2 delete 0 -1 + .l2 delete -1 -1 .l2 get 0 end } -cleanup { destroy .l2 @@ -2662,41 +2662,37 @@ test listbox-21.8 {ListboxListVarProc, test selection after listvar mod} -setup test listbox-21.9 {ListboxListVarProc, test hscrollbar after listvar mod} -setup { destroy .l } -body { - catch {unset x} + set x {} listbox .l -font $fixed -width 10 -xscrollcommand "record x" -listvar x - set log {} pack .l - set timeout [after 500 {set log timeout}] - vwait log + update idletasks + set log {} lappend x "0000000000" - update + update idletasks lappend x "00000000000000000000" - update + update idletasks set log } -cleanup { destroy .l - after cancel $timeout -} -result [list {x 0 1} {x 0 1} {x 0 0.5}] +} -result [list {x 0 1} {x 0 0.5}] test listbox-21.10 {ListboxListVarProc, test hscrollbar after listvar mod} -setup { destroy .l } -body { catch {unset x} listbox .l -font $fixed -width 10 -xscrollcommand "record x" -listvar x - set log {} pack .l - set timeout [after 500 {set log timeout}] - vwait log + update idletasks + set log {} lappend x "0000000000" - update + update idletasks lappend x "00000000000000000000" - update + update idletasks set x [list "0000000000"] - update + update idletasks set log } -cleanup { destroy .l - after cancel timeout -} -result [list {x 0 1} {x 0 1} {x 0 0.5} {x 0 1}] +} -result [list {x 0 1} {x 0 0.5} {x 0 1}] test listbox-21.11 {ListboxListVarProc, bad list} -setup { destroy .l } -body { @@ -2764,7 +2760,7 @@ test listbox-21.15 {ListboxListVarProc, update vertical scrollbar} -setup { update set log {} pack .l - set timeout [after 500 {set log timeout}] + set timeout [after 500 {lappend log timeout3}] vwait log update lappend x a b c d e f @@ -2801,19 +2797,19 @@ test listbox-22.1 {UpdateHScrollbar} -setup { destroy .l } -body { listbox .l -font $fixed -width 10 -xscrollcommand "record x" - set log {} pack .l - set timeout [after 500 {set log timeout}] - vwait log + update idletasks + set log {} + set timeout [after 500 {lappend log timeout4}] .l insert end "0000000000" - update + vwait log .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}] +} -result [list {x 0 1} {x 0 0.5}] # ConfigureListboxItem @@ -3221,8 +3217,3 @@ option clear # cleanup cleanupTests return - - - - - |