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 | |
parent | 3147ddd47a51d3ff290bc0be54646e541624c7fa (diff) | |
parent | 3954d71d18d5d5aa61f21d4137726beb13a0047c (diff) | |
download | tk-d83dea17ecb2f74e3048b02992ce5e9c30573b12.zip tk-d83dea17ecb2f74e3048b02992ce5e9c30573b12.tar.gz tk-d83dea17ecb2f74e3048b02992ce5e9c30573b12.tar.bz2 |
Merge trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/button.test | 8 | ||||
-rw-r--r-- | tests/canvText.test | 4 | ||||
-rw-r--r-- | tests/entry.test | 4 | ||||
-rw-r--r-- | tests/font.test | 6 | ||||
-rw-r--r-- | tests/listbox.test | 66 | ||||
-rw-r--r-- | tests/menu.test | 8 | ||||
-rw-r--r-- | tests/menuDraw.test | 2 | ||||
-rw-r--r-- | tests/menubut.test | 2 | ||||
-rw-r--r-- | tests/spinbox.test | 4 |
9 files changed, 52 insertions, 52 deletions
diff --git a/tests/button.test b/tests/button.test index 04d4aa0..36ff79d 100644 --- a/tests/button.test +++ b/tests/button.test @@ -2414,7 +2414,7 @@ test button-1.244 {configuration option: "underline" for label} -setup { .l configure -underline 3p } -cleanup { destroy .l -} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} test button-1.245 {configuration option: "underline" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -2433,7 +2433,7 @@ test button-1.246 {configuration option: "underline" for button} -setup { .b configure -underline 3p } -cleanup { destroy .b -} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} test button-1.247 {configuration option: "underline" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -2452,7 +2452,7 @@ test button-1.248 {configuration option: "underline" for checkbutton} -setup { .c configure -underline 3p } -cleanup { destroy .c -} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} test button-1.249 {configuration option: "underline" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -2471,7 +2471,7 @@ test button-1.250 {configuration option: "underline" for radiobutton} -setup { .r configure -underline 3p } -cleanup { destroy .r -} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} test button-1.251 {configuration option: "tristatevalue" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} diff --git a/tests/canvText.test b/tests/canvText.test index 0a2adfc..a097e8f 100644 --- a/tests/canvText.test +++ b/tests/canvText.test @@ -63,7 +63,7 @@ test canvText-1.12 {configuration options: good value for "underline"} -body { } -result {0 0} test canvasText-1.13 {configuration options: bad value for "underline"} -body { .c itemconfigure test -underline xyz -} -returnCodes error -result {bad index "xyz": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes error -result {bad index "xyz": must be integer?[+-]integer? or end?[+-]integer?} test canvText-1.14 {configuration options: good value for "width"} -body { .c itemconfigure test -width 6 list [lindex [.c itemconfigure test -width] 4] [.c itemcget test -width] @@ -753,7 +753,7 @@ test canvText-14.1 {GetTextIndex procedure} -setup { list [.c index test end] [.c index test insert] \ [.c index test sel.first] [.c index test sel.last] \ [.c index test @0,0] \ - [.c index test none] [.c index test 10] [.c index test 100] + [.c index test -1] [.c index test 10] [.c index test 100] } -cleanup { .c delete test } -result {15 12 5 8 0 0 10 15} diff --git a/tests/entry.test b/tests/entry.test index b70a92e..8962662 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -1533,7 +1533,7 @@ test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup { .e insert end "runs off the end of the window quite a bit." .e xview 0 update - .e xview none + .e xview -1 .e index @0 } -cleanup { destroy .e @@ -2833,7 +2833,7 @@ test entry-13.23 {GetEntryIndex procedure} -body { .e insert 0 012345678901234567890 .e xview 4 update - .e index none + .e index -1 } -cleanup { destroy .e } -result 0 diff --git a/tests/font.test b/tests/font.test index 5ff9750..64548ae 100644 --- a/tests/font.test +++ b/tests/font.test @@ -1681,14 +1681,14 @@ destroy .t.f pack [label .t.f] update test font-27.1 {Tk_UnderlineTextLayout procedure: no underline chosen} -body { - .t.f config -text "foo" -underline none + .t.f config -text "foo" -underline {} } -result {} test font-27.2 {Tk_UnderlineTextLayout procedure: underline not visible} -body { .t.f config -text "000 00000" -wrap [expr $ax*7] -under 10 } -result {} test font-27.3 {Tk_UnderlineTextLayout procedure: underline is visible} -body { .t.f config -text "000 00000" -wrap [expr $ax*7] -under 5 - .t.f config -wrap -1 -underline none + .t.f config -wrap -1 -underline {} } -result {} destroy .t.f @@ -1763,7 +1763,7 @@ destroy .t.f pack [label .t.f] update test font-29.1 {Tk_CharBBox procedure: index < 0} -body { - .t.f config -text "000" -underline none + .t.f config -text "000" -underline {} } -result {} test font-29.2 {Tk_CharBBox procedure: loop} -body { .t.f config -text "000\t000\t000\t000" -underline 9 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 { diff --git a/tests/menu.test b/tests/menu.test index ee5e90d..87e0c42 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -1199,11 +1199,11 @@ test menu-2.223 {entry configuration options 0 -underline 3p tearoff} -body { test menu-2.224 {entry configuration options 1 -underline 3p command} -body { .m1 entryconfigure 1 -underline 3p -} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} test menu-2.225 {entry configuration options 2 -underline 3p cascade} -body { .m1 entryconfigure 2 -underline 3p -} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} test menu-2.226 {entry configuration options 3 -underline 3p separator} -body { .m1 entryconfigure 3 -underline 3p @@ -1211,11 +1211,11 @@ test menu-2.226 {entry configuration options 3 -underline 3p separator} -body { test menu-2.227 {entry configuration options 4 -underline 3p checkbutton} -body { .m1 entryconfigure 4 -underline 3p -} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} test menu-2.228 {entry configuration options 5 -underline 3p radiobutton} -body { .m1 entryconfigure 5 -underline 3p -} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} deleteWindows if {[testConstraint hasEarthPhoto]} { diff --git a/tests/menuDraw.test b/tests/menuDraw.test index 9382974..776c985 100644 --- a/tests/menuDraw.test +++ b/tests/menuDraw.test @@ -561,7 +561,7 @@ test menuDraw-15.2 {TkPostTearoffMenu - Deactivation} -setup { $tearoff index active } -cleanup { deleteWindows -} -result {none} +} -result -1 test menuDraw-15.3 {TkPostTearoffMenu - post command} -setup { deleteWindows } -body { diff --git a/tests/menubut.test b/tests/menubut.test index fa4d89d..535eafb 100644 --- a/tests/menubut.test +++ b/tests/menubut.test @@ -294,7 +294,7 @@ test menubutton-1.54 {configuration options} -body { } -result 5 test menubutton-1.55 {configuration options} -body { .mb configure -underline 3p -} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer? or none} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer? or end?[+-]integer?} test menubutton-1.56 {configuration options} -body { .mb configure -width 402 .mb cget -width diff --git a/tests/spinbox.test b/tests/spinbox.test index 371d0a6..2d27bf0 100644 --- a/tests/spinbox.test +++ b/tests/spinbox.test @@ -1871,7 +1871,7 @@ test spinbox-3.79 {SpinboxWidgetCmd procedure, "xview" widget command} -setup { .e insert end "runs off the end of the window quite a bit." .e xview 0 update - .e xview none + .e xview -1 .e index @0 } -cleanup { destroy .e @@ -3115,7 +3115,7 @@ test spinbox-13.23 {GetSpinboxIndex procedure} -body { .e insert 0 012345678901234567890 .e xview 4 update - .e index none + .e index -1 } -cleanup { destroy .e } -result 0 |