diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-17 14:55:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-17 14:55:35 (GMT) |
commit | d83dea17ecb2f74e3048b02992ce5e9c30573b12 (patch) | |
tree | a975c0e201e4ad8e51341d6bb989c90f67aee7d9 /tests/listbox.test | |
parent | 3147ddd47a51d3ff290bc0be54646e541624c7fa (diff) | |
parent | 3954d71d18d5d5aa61f21d4137726beb13a0047c (diff) | |
download | tk-d83dea17ecb2f74e3048b02992ce5e9c30573b12.zip tk-d83dea17ecb2f74e3048b02992ce5e9c30573b12.tar.gz tk-d83dea17ecb2f74e3048b02992ce5e9c30573b12.tar.bz2 |
Merge trunk
Diffstat (limited to 'tests/listbox.test')
-rw-r--r-- | tests/listbox.test | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/tests/listbox.test b/tests/listbox.test index c03b881..730b5f4 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -368,13 +368,13 @@ test listbox-3.3 {ListboxWidgetCmd procedure, "activate" option} -body { } -returnCodes error -result {wrong # args: should be ".l activate index"} test listbox-3.4 {ListboxWidgetCmd procedure, "activate" option} -body { .l activate fooey -} -returnCodes error -result {bad listbox index "fooey": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "fooey": must be active, anchor, end, @x,y, or an index} test listbox-3.5 {ListboxWidgetCmd procedure, "activate" option} -body { .l activate 3 .l index active } -result 3 test listbox-3.6 {ListboxWidgetCmd procedure, "activate" option} -body { - .l activate none + .l activate -1 .l index active } -result 0 test listbox-3.7 {ListboxWidgetCmd procedure, "activate" option} -body { @@ -393,7 +393,7 @@ test listbox-3.10 {ListboxWidgetCmd procedure, "bbox" option} -body { } -returnCodes error -result {wrong # args: should be ".l bbox index"} test listbox-3.11 {ListboxWidgetCmd procedure, "bbox" option} -body { .l bbox fooey -} -returnCodes error -result {bad listbox index "fooey": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "fooey": must be active, anchor, end, @x,y, or an index} test listbox-3.12 {ListboxWidgetCmd procedure, "bbox" option} -body { .l yview 3 update @@ -558,10 +558,10 @@ test listbox-3.31 {ListboxWidgetCmd procedure, "delete" option} -body { } -returnCodes error -result {wrong # args: should be ".l delete firstIndex ?lastIndex?"} test listbox-3.32 {ListboxWidgetCmd procedure, "delete" option} -body { .l delete badIndex -} -returnCodes error -result {bad listbox index "badIndex": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "badIndex": must be active, anchor, end, @x,y, or an index} test listbox-3.33 {ListboxWidgetCmd procedure, "delete" option} -body { .l delete 2 123ab -} -returnCodes error -result {bad listbox index "123ab": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "123ab": must be active, anchor, end, @x,y, or an index} test listbox-3.34 {ListboxWidgetCmd procedure, "delete" option} -setup { destroy .l2 } -body { @@ -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 none + .l2 delete 0 -1 .l2 get 0 end } -cleanup { destroy .l2 @@ -650,10 +650,10 @@ test listbox-3.43 {ListboxWidgetCmd procedure, "get" option} -body { } -returnCodes error -result {wrong # args: should be ".l get firstIndex ?lastIndex?"} test listbox-3.44 {ListboxWidgetCmd procedure, "get" option} -body { .l get 2.4 -} -returnCodes error -result {bad listbox index "2.4": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "2.4": must be active, anchor, end, @x,y, or an index} test listbox-3.45 {ListboxWidgetCmd procedure, "get" option} -body { .l get end bogus -} -returnCodes error -result {bad listbox index "bogus": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "bogus": must be active, anchor, end, @x,y, or an index} test listbox-3.46 {ListboxWidgetCmd procedure, "get" option} -setup { destroy .l2 } -body { @@ -681,13 +681,13 @@ test listbox-3.48 {ListboxWidgetCmd procedure, "get" option} -setup { destroy .l2 } -result {{two words} el4 el5 el6 el7} test listbox-3.49 {ListboxWidgetCmd procedure, "get" option} -body { - .l get none + .l get -1 } -result {} test listbox-3.50 {ListboxWidgetCmd procedure, "get" option} -body { - .l get none none + .l get -1 -1 } -result {} test listbox-3.51 {ListboxWidgetCmd procedure, "get" option} -body { - .l get none 3 + .l get -1 3 } -result {el0 el1 el2 el3} test listbox-3.52 {ListboxWidgetCmd procedure, "get" option} -body { .l get 12 end @@ -712,12 +712,12 @@ test listbox-3.58 {ListboxWidgetCmd procedure, "index" option} -body { } -returnCodes error -result {wrong # args: should be ".l index index"} test listbox-3.59 {ListboxWidgetCmd procedure, "index" option} -body { .l index @ -} -returnCodes error -result {bad listbox index "@": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "@": must be active, anchor, end, @x,y, or an index} test listbox-3.60 {ListboxWidgetCmd procedure, "index" option} -body { .l index 2 } -result 2 test listbox-3.61 {ListboxWidgetCmd procedure, "index" option} -body { - .l index none + .l index -1 } -result {-1} test listbox-3.62 {ListboxWidgetCmd procedure, "index" option} -body { .l index end @@ -730,7 +730,7 @@ test listbox-3.64 {ListboxWidgetCmd procedure, "insert" option} -body { } -returnCodes error -result {wrong # args: should be ".l insert index ?element ...?"} test listbox-3.65 {ListboxWidgetCmd procedure, "insert" option} -body { .l insert badIndex -} -returnCodes error -result {bad listbox index "badIndex": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "badIndex": must be active, anchor, end, @x,y, or an index} test listbox-3.66 {ListboxWidgetCmd procedure, "insert" option} -setup { destroy .l2 } -body { @@ -825,7 +825,7 @@ test listbox-3.81 {ListboxWidgetCmd procedure, "see" option} -body { } -returnCodes error -result {wrong # args: should be ".l see index"} test listbox-3.82 {ListboxWidgetCmd procedure, "see" option} -body { .l see gorp -} -returnCodes error -result {bad listbox index "gorp": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "gorp": must be active, anchor, end, @x,y, or an index} test listbox-3.83 {ListboxWidgetCmd procedure, "see" option} -body { .l yview 7 .l see 7 @@ -858,7 +858,7 @@ test listbox-3.88 {ListboxWidgetCmd procedure, "see" option} -body { } -result 11 test listbox-3.89 {ListboxWidgetCmd procedure, "see" option} -body { .l yview 7 - .l see none + .l see -1 .l index @0,0 } -result 0 test listbox-3.90 {ListboxWidgetCmd procedure, "see" option} -body { @@ -884,10 +884,10 @@ test listbox-3.94 {ListboxWidgetCmd procedure, "selection" option} -body { } -returnCodes error -result {wrong # args: should be ".l selection option index ?index?"} test listbox-3.95 {ListboxWidgetCmd procedure, "selection" option} -body { .l selection a bogus -} -returnCodes error -result {bad listbox index "bogus": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "bogus": must be active, anchor, end, @x,y, or an index} test listbox-3.96 {ListboxWidgetCmd procedure, "selection" option} -body { .l selection a 0 lousy -} -returnCodes error -result {bad listbox index "lousy": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "lousy": must be active, anchor, end, @x,y, or an index} test listbox-3.97 {ListboxWidgetCmd procedure, "selection" option} -body { .l selection anchor 0 0 } -returnCodes error -result {wrong # args: should be ".l selection anchor index"} @@ -896,7 +896,7 @@ test listbox-3.98 {ListboxWidgetCmd procedure, "selection" option} -body { [.l selection anchor 0; .l index anchor] } -result {5 0} test listbox-3.99 {ListboxWidgetCmd procedure, "selection" option} -body { - .l selection anchor none + .l selection anchor -1 .l index anchor } -result 0 test listbox-3.100 {ListboxWidgetCmd procedure, "selection" option} -body { @@ -925,7 +925,7 @@ test listbox-3.104 {ListboxWidgetCmd procedure, "selection" option} -body { } -result {1 0 1} test listbox-3.105 {ListboxWidgetCmd procedure, "selection" option} -body { .l selection set 0 end - .l selection includes none + .l selection includes -1 } -result 0 test listbox-3.106 {ListboxWidgetCmd procedure, "selection" option} -body { .l selection clear 0 end @@ -1135,7 +1135,7 @@ pack .l update test listbox-3.127 {ListboxWidgetCmd procedure, "xview" option} -body { .l yview foo -} -returnCodes error -result {bad listbox index "foo": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "foo": must be active, anchor, end, @x,y, or an index} test listbox-3.128 {ListboxWidgetCmd procedure, "xview" option} -body { .l yview foo a b } -returnCodes error -result {unknown option "foo": must be moveto or scroll} @@ -1977,7 +1977,7 @@ test listbox-10.4 {GetListboxIndex procedure} -setup { .l index a } -cleanup { destroy .l -} -returnCodes error -result {bad listbox index "a": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "a": must be active, anchor, end, @x,y, or an index} test listbox-10.5 {GetListboxIndex procedure} -setup { destroy .l } -body { @@ -2018,7 +2018,7 @@ test listbox-10.8 {GetListboxIndex procedure} -setup { .l index @ } -cleanup { destroy .l -} -returnCodes error -result {bad listbox index "@": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "@": must be active, anchor, end, @x,y, or an index} test listbox-10.9 {GetListboxIndex procedure} -setup { destroy .l } -body { @@ -2028,7 +2028,7 @@ test listbox-10.9 {GetListboxIndex procedure} -setup { .l index @foo } -cleanup { destroy .l -} -returnCodes error -result {bad listbox index "@foo": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "@foo": must be active, anchor, end, @x,y, or an index} test listbox-10.10 {GetListboxIndex procedure} -setup { destroy .l } -body { @@ -2038,7 +2038,7 @@ test listbox-10.10 {GetListboxIndex procedure} -setup { .l index @1x3 } -cleanup { destroy .l -} -returnCodes error -result {bad listbox index "@1x3": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "@1x3": must be active, anchor, end, @x,y, or an index} test listbox-10.11 {GetListboxIndex procedure} -setup { destroy .l } -body { @@ -2048,7 +2048,7 @@ test listbox-10.11 {GetListboxIndex procedure} -setup { .l index @1, } -cleanup { destroy .l -} -returnCodes error -result {bad listbox index "@1,": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "@1,": must be active, anchor, end, @x,y, or an index} test listbox-10.12 {GetListboxIndex procedure} -setup { destroy .l } -body { @@ -2058,7 +2058,7 @@ test listbox-10.12 {GetListboxIndex procedure} -setup { .l index @1,foo } -cleanup { destroy .l -} -returnCodes error -result {bad listbox index "@1,foo": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "@1,foo": must be active, anchor, end, @x,y, or an index} test listbox-10.13 {GetListboxIndex procedure} -setup { destroy .l } -body { @@ -2068,7 +2068,7 @@ test listbox-10.13 {GetListboxIndex procedure} -setup { .l index @1,2x } -cleanup { destroy .l -} -returnCodes error -result {bad listbox index "@1,2x": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "@1,2x": must be active, anchor, end, @x,y, or an index} test listbox-10.14 {GetListboxIndex procedure} -constraints { fonts } -setup { @@ -2092,7 +2092,7 @@ test listbox-10.15 {GetListboxIndex procedure} -setup { .l index 1xy } -cleanup { destroy .l -} -returnCodes error -result {bad listbox index "1xy": must be active, anchor, end, @x,y, or a number} +} -returnCodes error -result {bad listbox index "1xy": must be active, anchor, end, @x,y, or an index} test listbox-10.16 {GetListboxIndex procedure} -setup { destroy .l } -body { @@ -2129,7 +2129,7 @@ test listbox-10.19 {GetListboxIndex procedure} -setup { pack [listbox .l] .l insert 0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11 update - .l index none + .l index -1 } -cleanup { destroy .l } -result -1 @@ -2155,7 +2155,7 @@ test listbox-11.1 {ChangeListboxView procedure, boundary conditions for index} - .l yview 3 update set x [.l index @0,0] - .l yview none + .l yview -1 update lappend x [.l index @0,0] } -cleanup { @@ -2378,14 +2378,14 @@ test listbox-15.4 {ListboxSelect procedure, boundary conditions for indices} -bo .l delete 0 end .l insert 0 a b c d e f .l select clear 0 end - .l select set none none + .l select set -1 -1 .l curselection } -result {} test listbox-15.5 {ListboxSelect procedure, boundary conditions for indices} -body { .l delete 0 end .l insert 0 a b c d e f .l select clear 0 end - .l select set none 3 + .l select set -1 3 .l curselection } -result {0 1 2 3} test listbox-15.6 {ListboxSelect procedure, boundary conditions for indices} -body { |