summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-20 16:40:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-20 16:40:40 (GMT)
commit22fe0d1d6e8005615cb1426306dd6e36506c234c (patch)
tree78fe882b0bbeaf9bf92bf03de98d5641f042cf51 /tests
parentb1869452a83f8d245e5b73d16d10f0d2f9601896 (diff)
parentf9ec3c570c9b20d763e82a4abaacade3c4482750 (diff)
downloadtk-22fe0d1d6e8005615cb1426306dd6e36506c234c.zip
tk-22fe0d1d6e8005615cb1426306dd6e36506c234c.tar.gz
tk-22fe0d1d6e8005615cb1426306dd6e36506c234c.tar.bz2
Merge 8.7
Diffstat (limited to 'tests')
-rw-r--r--tests/button.test8
-rw-r--r--tests/canvText.test2
-rw-r--r--tests/config.test206
-rw-r--r--tests/menu.test16
-rw-r--r--tests/menubut.test2
-rw-r--r--tests/ttk/combobox.test7
-rw-r--r--tests/ttk/ttk.test9
7 files changed, 139 insertions, 111 deletions
diff --git a/tests/button.test b/tests/button.test
index 1a53a74..8a2df22 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? or end?[+-]integer?}
+} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
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? or end?[+-]integer?}
+} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
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? or end?[+-]integer?}
+} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
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? or end?[+-]integer?}
+} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
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 ace4740..58cc789 100644
--- a/tests/canvText.test
+++ b/tests/canvText.test
@@ -66,7 +66,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? or end?[+-]integer?}
+} -returnCodes error -result {bad index "xyz": must be integer?[+-]integer?, end?[+-]integer?, or ""}
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]
diff --git a/tests/config.test b/tests/config.test
index ff06a22..82a342e 100644
--- a/tests/config.test
+++ b/tests/config.test
@@ -42,7 +42,7 @@ test config-1.1 {Tk_CreateOptionTable - reference counts} -constraints {
set x
} -cleanup {
killTables
-} -result {{1 16 -boolean} {2 16 -boolean}}
+} -result {{1 17 -boolean} {2 17 -boolean}}
test config-1.2 {Tk_CreateOptionTable - synonym initialization} -constraints {
testobjconfig
} -body {
@@ -50,7 +50,7 @@ test config-1.2 {Tk_CreateOptionTable - synonym initialization} -constraints {
.a cget -color
} -cleanup {
killTables
-} -result {green}
+} -result green
test config-1.3 {Tk_CreateOptionTable - option database initialization} -constraints {
testobjconfig
} -body {
@@ -77,10 +77,10 @@ test config-1.5 {Tk_CreateOptionTable - default initialization} -constraints {
testobjconfig
} -body {
testobjconfig alltypes .a
- .a cget -relief
+ .a cget -anchor
} -cleanup {
killTables
-} -result {raised}
+} -result center
test config-1.6 {Tk_CreateOptionTable - chained tables} -constraints {
testobjconfig
} -body {
@@ -156,7 +156,7 @@ test config-3.2 {Tk_InitOptions - initialize from database} -constraints {
} -cleanup {
killTables
option clear
-} -result {blue}
+} -result blue
test config-3.3 {Tk_InitOptions - initialize from database} -constraints {
testobjconfig
} -body {
@@ -166,7 +166,7 @@ test config-3.3 {Tk_InitOptions - initialize from database} -constraints {
} -cleanup {
killTables
option clear
-} -result {left}
+} -result left
test config-3.4 {Tk_InitOptions - initialize from widget class} -constraints {
testobjconfig
} -body {
@@ -174,12 +174,12 @@ test config-3.4 {Tk_InitOptions - initialize from widget class} -constraints {
list [.a cget -color]
} -cleanup {
killTables
-} -result {red}
+} -result red
test config-3.5 {Tk_InitOptions - no initial value} -constraints {
testobjconfig
} -body {
testobjconfig alltypes .a
- .a cget -anchor
+ .a cget -relief
} -cleanup {
killTables
} -result {}
@@ -227,7 +227,7 @@ test config-4.1 {DoObjConfig - boolean} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -boolean 0
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.2 {DoObjConfig - boolean} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -251,7 +251,7 @@ test config-4.4 {DoObjConfig - boolean} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -boolean 1
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.5 {DoObjConfig - boolean} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -295,7 +295,7 @@ test config-4.9 {DoObjConfig - integer} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -integer 3
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.10 {DoObjConfig - integer} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -341,7 +341,7 @@ test config-4.14 {DoObjConfig - double} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -double 3.14
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.15 {DoObjConfig - double} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -349,7 +349,7 @@ test config-4.15 {DoObjConfig - double} -constraints testobjconfig -setup {
.foo cget -double
} -cleanup {
killTables
-} -returnCodes ok -result {3.14}
+} -returnCodes ok -result 3.14
test config-4.16 {DoObjConfig - double} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -377,7 +377,7 @@ test config-4.18 {DoObjConfig - double internal value} -constraints {
.foo cget -double
} -cleanup {
killTables
-} -result {62.75}
+} -result 62.75
test config-4.19 {DoObjConfig - string} -constraints testobjconfig -setup {
catch {rename .foo {}}
@@ -385,7 +385,7 @@ test config-4.19 {DoObjConfig - string} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -string test
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.20 {DoObjConfig - string} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -393,7 +393,7 @@ test config-4.20 {DoObjConfig - string} -constraints testobjconfig -setup {
.foo cget -string
} -cleanup {
killTables
-} -returnCodes ok -result {test}
+} -returnCodes ok -result test
test config-4.21 {DoObjConfig - string} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -409,7 +409,7 @@ test config-4.22 {DoObjConfig - null string} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -string {}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.23 {DoObjConfig - null string} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -443,13 +443,13 @@ test config-4.26 {DoObjConfig - string table} -constraints testobjconfig -body {
testobjconfig alltypes .foo -stringtable two
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.27 {DoObjConfig - string table} -constraints testobjconfig -body {
testobjconfig alltypes .foo -stringtable two
.foo cget -stringtable
} -cleanup {
killTables
-} -returnCodes ok -result {two}
+} -returnCodes ok -result two
test config-4.28 {DoObjConfig - string table} -constraints testobjconfig -body {
testobjconfig alltypes .foo -stringtable two
.foo cget -stringtable
@@ -464,7 +464,13 @@ test config-4.29 {DoObjConfig - invalid string table} -constraints {
} -cleanup {
killTables
} -returnCodes error -result {bad stringtable "foo": must be one, two, three, or four}
-
+test config-4.29a {DoObjConfig - invalid string table} -constraints {
+ testobjconfig
+} -body {
+ testobjconfig alltypes .foo -stringtable2 foo
+} -cleanup {
+ killTables
+} -returnCodes error -result {bad stringtable2 "foo": must be one or two}
test config-4.30 {DoObjConfig - new string table} -constraints {
testobjconfig
} -body {
@@ -481,7 +487,7 @@ test config-4.31 {DoObjConfig - new string table} -constraints {
.foo cget -stringtable
} -cleanup {
killTables
-} -returnCodes ok -result {three}
+} -returnCodes ok -result three
test config-4.32 {DoObjConfig - new string table} -constraints {
testobjconfig
} -body {
@@ -501,19 +507,19 @@ test config-4.33 {DoObjConfig - stringtable internal value} -constraints {
.foo cget -stringtable
} -cleanup {
killTables
-} -result {four}
+} -result four
test config-4.34 {DoObjConfig - color} -constraints testobjconfig -body {
testobjconfig alltypes .foo -color blue
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.35 {DoObjConfig - color} -constraints testobjconfig -body {
testobjconfig alltypes .foo -color blue
.foo cget -color
} -cleanup {
killTables
-} -returnCodes ok -result {blue}
+} -returnCodes ok -result blue
test config-4.36 {DoObjConfig - color} -constraints testobjconfig -body {
testobjconfig alltypes .foo -color blue
.foo cget -color
@@ -537,13 +543,13 @@ test config-4.38 {DoObjConfig - color internal value} -constraints {
.foo cget -color
} -cleanup {
killTables
-} -result {purple}
+} -result purple
test config-4.39 {DoObjConfig - null color} -constraints testobjconfig -body {
testobjconfig alltypes .foo -color {}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.40 {DoObjConfig - null color} -constraints testobjconfig -body {
testobjconfig alltypes .foo -color {}
.foo cget -color
@@ -591,7 +597,7 @@ test config-4.45 {DoObjConfig - font} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -font {Helvetica 72}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.46 {DoObjConfig - font} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -632,7 +638,7 @@ test config-4.50 {DoObjConfig - null font} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -font {}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.51 {DoObjConfig - null font} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -656,13 +662,13 @@ test config-4.53 {DoObjConfig - bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap gray75
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.54 {DoObjConfig - bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap gray75
.foo cget -bitmap
} -cleanup {
killTables
-} -returnCodes ok -result {gray75}
+} -returnCodes ok -result gray75
test config-4.55 {DoObjConfig - new bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap gray75
.foo configure -bitmap gray50
@@ -675,7 +681,7 @@ test config-4.56 {DoObjConfig - new bitmap} -constraints testobjconfig -body {
.foo cget -bitmap
} -cleanup {
killTables
-} -returnCodes ok -result {gray50}
+} -returnCodes ok -result gray50
test config-4.57 {DoObjConfig - invalid bitmap} -constraints {
testobjconfig
} -body {
@@ -687,7 +693,7 @@ test config-4.58 {DoObjConfig - null bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap {}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.59 {DoObjConfig - null bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap {}
.foo cget -bitmap
@@ -703,19 +709,19 @@ test config-4.60 {DoObjConfig - bitmap internal value} -constraints {
.foo cget -bitmap
} -cleanup {
killTables
-} -result {gray25}
+} -result gray25
test config-4.61 {DoObjConfig - border} -constraints testobjconfig -body {
testobjconfig alltypes .foo -border green
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.62 {DoObjConfig - border} -constraints testobjconfig -body {
testobjconfig alltypes .foo -border green
.foo cget -border
} -cleanup {
killTables
-} -returnCodes ok -result {green}
+} -returnCodes ok -result green
test config-4.63 {DoObjConfig - invalid border} -constraints {
testobjconfig
} -body {
@@ -727,7 +733,7 @@ test config-4.64 {DoObjConfig - null border} -constraints testobjconfig -body {
testobjconfig alltypes .foo -border {}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.65 {DoObjConfig - null border} -constraints testobjconfig -body {
testobjconfig alltypes .foo -border {}
.foo cget -border
@@ -766,13 +772,13 @@ test config-4.69 {DoObjConfig - relief} -constraints testobjconfig -body {
testobjconfig alltypes .foo -relief flat
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.70 {DoObjConfig - relief} -constraints testobjconfig -body {
testobjconfig alltypes .foo -relief flat
.foo cget -relief
} -cleanup {
killTables
-} -returnCodes ok -result {flat}
+} -returnCodes ok -result flat
test config-4.71 {DoObjConfig - invalid relief} -constraints {
testobjconfig
} -body {
@@ -787,7 +793,7 @@ test config-4.72 {DoObjConfig - relief internal value} -constraints testobjconfi
.foo cget -relief
} -cleanup {
killTables
-} -result {ridge}
+} -result ridge
test config-4.73 {DoObjConfig - new relief} -constraints testobjconfig -body {
testobjconfig alltypes .foo -relief raised
.foo configure -relief flat
@@ -800,19 +806,19 @@ test config-4.74 {DoObjConfig - new relief} -constraints testobjconfig -body {
.foo cget -relief
} -cleanup {
killTables
-} -returnCodes ok -result {flat}
+} -returnCodes ok -result flat
test config-4.75 {DoObjConfig - cursor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -cursor arrow
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.76 {DoObjConfig - cursor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -cursor arrow
.foo cget -cursor
} -cleanup {
killTables
-} -returnCodes ok -result {arrow}
+} -returnCodes ok -result arrow
test config-4.77 {DoObjConfig - invalid cursor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -cursor foo
} -cleanup {
@@ -824,7 +830,7 @@ test config-4.78 {DoObjConfig - null cursor} -constraints testobjconfig -setup {
testobjconfig alltypes .foo -cursor {}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.79 {DoObjConfig - null cursor} -constraints testobjconfig -setup {
catch {rename .foo {}}
} -body {
@@ -845,7 +851,7 @@ test config-4.81 {DoObjConfig - new cursor} -constraints testobjconfig -body {
.foo cget -cursor
} -cleanup {
killTables
-} -returnCodes ok -result {arrow}
+} -returnCodes ok -result arrow
test config-4.82 {DoObjConfig - cursor internal value} -constraints {
testobjconfig
} -setup {
@@ -855,19 +861,19 @@ test config-4.82 {DoObjConfig - cursor internal value} -constraints {
.foo cget -cursor
} -cleanup {
killTables
-} -result {watch}
+} -result watch
test config-4.83 {DoObjConfig - justify} -constraints testobjconfig -body {
testobjconfig alltypes .foo -justify center
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.84 {DoObjConfig - justify} -constraints testobjconfig -body {
testobjconfig alltypes .foo -justify center
.foo cget -justify
} -cleanup {
killTables
-} -returnCodes ok -result {center}
+} -returnCodes ok -result center
test config-4.85 {DoObjConfig - invalid justify} -constraints testobjconfig -body {
testobjconfig alltypes .foo -justify foo
} -cleanup {
@@ -885,7 +891,7 @@ test config-4.87 {DoObjConfig - new justify} -constraints testobjconfig -body {
.foo cget -justify
} -cleanup {
killTables
-} -returnCodes ok -result {right}
+} -returnCodes ok -result right
test config-4.88 {DoObjConfig - justify internal value} -constraints {
testobjconfig
} -setup {
@@ -895,19 +901,19 @@ test config-4.88 {DoObjConfig - justify internal value} -constraints {
.foo cget -justify
} -cleanup {
killTables
-} -result {center}
+} -result center
test config-4.89 {DoObjConfig - anchor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -anchor center
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.90 {DoObjConfig - anchor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -anchor center
.foo cget -anchor
} -cleanup {
killTables
-} -returnCodes ok -result {center}
+} -returnCodes ok -result center
test config-4.91 {DoObjConfig - invalid anchor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -anchor foo
} -cleanup {
@@ -925,7 +931,7 @@ test config-4.93 {DoObjConfig - new anchor} -constraints testobjconfig -body {
.foo cget -anchor
} -cleanup {
killTables
-} -returnCodes ok -result {n}
+} -returnCodes ok -result n
test config-4.94 {DoObjConfig - anchor internal value} -constraints {
testobjconfig
} -setup {
@@ -935,12 +941,12 @@ test config-4.94 {DoObjConfig - anchor internal value} -constraints {
.foo cget -anchor
} -cleanup {
killTables
-} -result {sw}
+} -result sw
test config-4.95 {DoObjConfig - pixel} -constraints testobjconfig -body {
testobjconfig alltypes .foo -pixel 42
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.96 {DoObjConfig - pixel} -constraints testobjconfig -body {
testobjconfig alltypes .foo -pixel 42
.foo cget -pixel
@@ -964,7 +970,7 @@ test config-4.99 {DoObjConfig - new pixel} -constraints testobjconfig -body {
.foo cget -pixel
} -cleanup {
killTables
-} -returnCodes ok -result {3c}
+} -returnCodes ok -result 3c
test config-4.100 {DoObjConfig - pixel internal value} -constraints {
testobjconfig
} -setup {
@@ -983,14 +989,14 @@ test config-4.101 {DoObjConfig - window} -constraints testobjconfig -body {
testobjconfig twowindows .foo -window .bar
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.102 {DoObjConfig - window} -constraints testobjconfig -body {
toplevel .bar
testobjconfig twowindows .foo -window .bar
.foo cget -window
} -cleanup {
killTables
-} -returnCodes ok -result {.bar}
+} -returnCodes ok -result .bar
test config-4.103 {DoObjConfig - invalid window} -constraints testobjconfig -body {
toplevel .bar
testobjconfig twowindows .foo -window foo
@@ -1002,7 +1008,7 @@ test config-4.104 {DoObjConfig - null window} -constraints testobjconfig -body {
testobjconfig twowindows .foo -window {}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.105 {DoObjConfig - null window} -constraints testobjconfig -body {
toplevel .bar
testobjconfig twowindows .foo -window {}
@@ -1026,7 +1032,7 @@ test config-4.107 {DoObjConfig - new window} -constraints testobjconfig -body {
.foo cget -window
} -cleanup {
killTables
-} -returnCodes ok -result {.blamph}
+} -returnCodes ok -result .blamph
test config-4.108 {DoObjConfig - window internal value} -constraints {
testobjconfig
} -setup {
@@ -1036,7 +1042,7 @@ test config-4.108 {DoObjConfig - window internal value} -constraints {
.foo cget -window
} -cleanup {
killTables
-} -result {.}
+} -result .
test config-4.109 {DoObjConfig - releasing old values} -constraints {
testobjconfig
@@ -1081,18 +1087,18 @@ test config-4.111 {DoObjConfig - custom} -constraints testobjconfig -body {
testobjconfig alltypes .foo -custom test
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.112 {DoObjConfig - custom} -constraints testobjconfig -body {
testobjconfig alltypes .foo -custom test
.foo cget -custom
} -cleanup {
killTables
-} -returnCodes ok -result {TEST}
+} -returnCodes ok -result TEST
test config-4.113 {DoObjConfig - null custom} -constraints testobjconfig -body {
testobjconfig alltypes .foo -custom {}
} -cleanup {
killTables
-} -returnCodes ok -result {.foo}
+} -returnCodes ok -result .foo
test config-4.114 {DoObjConfig - null custom} -constraints testobjconfig -body {
testobjconfig alltypes .foo -custom {}
.foo cget -custom
@@ -1151,7 +1157,7 @@ test config-6.2 {GetOptionFromObj - exact match} -constraints {
.a cget -one
} -cleanup {
killTables
-} -result {one}
+} -result one
test config-6.3 {GetOptionFromObj - abbreviation} -constraints {
testobjconfig
} -body {
@@ -1159,7 +1165,7 @@ test config-6.3 {GetOptionFromObj - abbreviation} -constraints {
.a cget -fo
} -cleanup {
killTables
-} -result {four}
+} -result four
test config-6.4 {GetOptionFromObj - ambiguous abbreviation} -constraints {
testobjconfig
} -body {
@@ -1183,7 +1189,7 @@ test config-6.6 {GetOptionFromObj - synonym} -constraints testobjconfig -body {
.b cget -synonym
} -cleanup {
killTables
-} -result {red}
+} -result red
if {[testConstraint testobjconfig]} {
@@ -1201,7 +1207,7 @@ test config-7.2 {Tk_SetOptions - bogus option name} -constraints {
test config-7.3 {Tk_SetOptions - synonym} -constraints testobjconfig -body {
.a configure -synonym blue
.a cget -color
-} -result {blue}
+} -result blue
test config-7.4 {Tk_SetOptions - missing value} -constraints {
testobjconfig
} -body {
@@ -1212,7 +1218,7 @@ test config-7.5 {Tk_SetOptions - missing value} -constraints {
} -body {
catch {.a configure -color green -relief}
.a cget -color
-} -result {green}
+} -result green
test config-7.6 {Tk_SetOptions - saving old values} -constraints {
testobjconfig
} -body {
@@ -1296,7 +1302,7 @@ test config-8.2 {Tk_RestoreSavedOptions - restore in proper order} -constraints
.a cget -color
} -cleanup {
killTables
-} -result {red}
+} -result red
test config-8.3 {Tk_RestoreSavedOptions - freeing object memory} -constraints {
testobjconfig
} -body {
@@ -1347,7 +1353,7 @@ test config-8.8 {Tk_RestoreSavedOptions - double internal form} -constraints {
.a cget -double
} -cleanup {
killTables
-} -result {3.14159}
+} -result 3.14159
test config-8.9 {Tk_RestoreSavedOptions - string internal form} -constraints {
testobjconfig
} -body {
@@ -1356,7 +1362,7 @@ test config-8.9 {Tk_RestoreSavedOptions - string internal form} -constraints {
.a cget -string
} -cleanup {
killTables
-} -result {foo}
+} -result foo
test config-8.10 {Tk_RestoreSavedOptions - string table internal form} -constraints {
testobjconfig
} -body {
@@ -1365,7 +1371,7 @@ test config-8.10 {Tk_RestoreSavedOptions - string table internal form} -constrai
.a cget -stringtable
} -cleanup {
killTables
-} -result {one}
+} -result one
test config-8.11 {Tk_RestoreSavedOptions - color internal form} -constraints {
testobjconfig
} -body {
@@ -1374,7 +1380,7 @@ test config-8.11 {Tk_RestoreSavedOptions - color internal form} -constraints {
.a cget -color
} -cleanup {
killTables
-} -result {red}
+} -result red
test config-8.12 {Tk_RestoreSavedOptions - font internal form} -constraints {
testobjconfig nonPortable
} -body {
@@ -1392,7 +1398,7 @@ test config-8.13 {Tk_RestoreSavedOptions - bitmap internal form} -constraints {
.a cget -bitmap
} -cleanup {
killTables
-} -result {gray50}
+} -result gray50
test config-8.14 {Tk_RestoreSavedOptions - border internal form} -constraints {
testobjconfig
} -body {
@@ -1401,16 +1407,16 @@ test config-8.14 {Tk_RestoreSavedOptions - border internal form} -constraints {
.a cget -border
} -cleanup {
killTables
-} -result {blue}
-test config-8.15 {Tk_RestoreSavedOptions - relief internal form} -constraints {
+} -result blue
+test config-8.15 {Tk_RestoreSavedOptions - anchor internal form} -constraints {
testobjconfig
} -body {
testobjconfig internal .a
- catch {.a csave -relief sunken -color bogus}
- .a cget -relief
+ catch {.a csave -anchor e -color bogus}
+ .a cget -anchor
} -cleanup {
killTables
-} -result {raised}
+} -result center
test config-8.16 {Tk_RestoreSavedOptions - cursor internal form} -constraints {
testobjconfig
} -body {
@@ -1419,7 +1425,7 @@ test config-8.16 {Tk_RestoreSavedOptions - cursor internal form} -constraints {
.a cget -cursor
} -cleanup {
killTables
-} -result {xterm}
+} -result xterm
test config-8.17 {Tk_RestoreSavedOptions - justify internal form} -constraints {
testobjconfig
} -body {
@@ -1428,16 +1434,16 @@ test config-8.17 {Tk_RestoreSavedOptions - justify internal form} -constraints {
.a cget -justify
} -cleanup {
killTables
-} -result {left}
+} -result left
test config-8.18 {Tk_RestoreSavedOptions - anchor internal form} -constraints {
testobjconfig
} -body {
testobjconfig internal .a
- catch {.a csave -anchor center -color bogus}
+ catch {.a csave -anchor n -color bogus}
.a cget -anchor
} -cleanup {
killTables
-} -result {n}
+} -result center
test config-8.19 {Tk_RestoreSavedOptions - window internal form} -constraints {
testobjconfig
} -body {
@@ -1446,7 +1452,7 @@ test config-8.19 {Tk_RestoreSavedOptions - window internal form} -constraints {
.a cget -window
} -cleanup {
killTables
-} -result {.a}
+} -result .a
test config-8.20 {Tk_RestoreSavedOptions - custom internal form} -constraints {
testobjconfig
} -body {
@@ -1455,7 +1461,7 @@ test config-8.20 {Tk_RestoreSavedOptions - custom internal form} -constraints {
.a cget -custom
} -cleanup {
killTables
-} -result {FOOBAR}
+} -result FOOBAR
# Most of the tests below will cause memory leakage if there is a
# problem. This may not be evident unless the tests are run in
@@ -1560,11 +1566,11 @@ if {[testConstraint testobjconfig]} {
test config-10.1 {Tk_GetOptionInfo - one item} -constraints testobjconfig -body {
testobjconfig alltypes .foo
- .foo configure -relief groove
- .foo configure -relief
+ .foo configure -anchor e
+ .foo configure -anchor
} -cleanup {
destroy .foo
-} -result {-relief relief Relief raised groove}
+} -result {-anchor anchor Anchor center e}
test config-10.2 {Tk_GetOptionInfo - one item, synonym} -constraints {
testobjconfig
} -body {
@@ -1581,7 +1587,7 @@ test config-10.3 {Tk_GetOptionInfo - all items} -constraints {
.foo configure
} -cleanup {
destroy .foo
-} -result {{-boolean boolean Boolean 1 1} {-integer integer Integer 7 13563} {-double double Double 3.14159 3.14159} {-string string String foo foo} {-stringtable StringTable stringTable one one} {-color color Color red red} {-font font Font {Helvetica 12} {Helvetica 18}} {-bitmap bitmap Bitmap gray50 gray50} {-border border Border blue blue} {-relief relief Relief raised raised} {-cursor cursor Cursor xterm xterm} {-justify {} {} left left} {-anchor anchor Anchor {} {}} {-pixel pixel Pixel 1 1} {-custom {} {} {} {}} {-synonym -color}}
+} -result {{-boolean boolean Boolean 1 1} {-integer integer Integer 7 13563} {-double double Double 3.14159 3.14159} {-string string String foo foo} {-stringtable StringTable stringTable one one} {-stringtable2 StringTable2 stringTable2 two two} {-color color Color red red} {-font font Font {Helvetica 12} {Helvetica 18}} {-bitmap bitmap Bitmap gray50 gray50} {-border border Border blue blue} {-relief relief Relief {} {}} {-cursor cursor Cursor xterm xterm} {-justify {} {} left left} {-anchor anchor Anchor center center} {-pixel pixel Pixel 1 1} {-custom {} {} {} {}} {-synonym -color}}
test config-10.4 {Tk_GetOptionInfo - chaining through tables} -constraints testobjconfig -body {
testobjconfig chain2 .foo -one asdf -three xyzzy
.foo configure
@@ -1607,8 +1613,8 @@ test config-11.2 {GetConfigList - null database names} -constraints {
test config-11.3 {GetConfigList - null default and current value} -constraints {
testobjconfig
} -body {
- .a configure -anchor
-} -result {-anchor anchor Anchor {} {}}
+ .a configure -relief
+} -result {-relief relief Relief {} {}}
if {[testConstraint testobjconfig]} {
killTables
}
@@ -1638,11 +1644,11 @@ test config-12.5 {GetObjectForOption - stringTable} -constraints {
} -body {
.a configure -stringtable "two"
.a cget -stringtable
-} -result {two}
+} -result two
test config-12.6 {GetObjectForOption - color} -constraints testobjconfig -body {
.a configure -color "green"
.a cget -color
-} -result {green}
+} -result green
test config-12.7 {GetObjectForOption - font} -constraints testobjconfig -body {
.a configure -font {Times 36}
.a cget -font
@@ -1650,7 +1656,7 @@ test config-12.7 {GetObjectForOption - font} -constraints testobjconfig -body {
test config-12.8 {GetObjectForOption - bitmap} -constraints testobjconfig -body {
.a configure -bitmap "questhead"
.a cget -bitmap
-} -result {questhead}
+} -result questhead
test config-12.9 {GetObjectForOption - border} -constraints testobjconfig -body {
.a configure -border #33217c
.a cget -border
@@ -1660,23 +1666,23 @@ test config-12.10 {GetObjectForOption - relief} -constraints {
} -body {
.a configure -relief groove
.a cget -relief
-} -result {groove}
+} -result groove
test config-12.11 {GetObjectForOption - cursor} -constraints {
testobjconfig
} -body {
.a configure -cursor watch
.a cget -cursor
-} -result {watch}
+} -result watch
test config-12.12 {GetObjectForOption - justify} -constraints {
testobjconfig
} -body {
.a configure -justify right
.a cget -justify
-} -result {right}
+} -result right
test config-12.13 {GetObjectForOption - anchor} -constraints testobjconfig -body {
.a configure -anchor e
.a cget -anchor
-} -result {e}
+} -result e
test config-12.14 {GetObjectForOption - pixels} -constraints testobjconfig -body {
.a configure -pixel 193.2
.a cget -pixel
@@ -1684,11 +1690,11 @@ test config-12.14 {GetObjectForOption - pixels} -constraints testobjconfig -body
test config-12.15 {GetObjectForOption - window} -constraints testobjconfig -body {
.a configure -window .a
.a cget -window
-} -result {.a}
+} -result .a
test config-12.16 {GetObjectForOption -custom} -constraints testobjconfig -body {
.a configure -custom foobar
.a cget -custom
-} -result {FOOBAR}
+} -result FOOBAR
test config-12.17 {GetObjectForOption - null values} -constraints {
testobjconfig
} -body {
diff --git a/tests/menu.test b/tests/menu.test
index 780fc44..4993761 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? or end?[+-]integer?}
+} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
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? or end?[+-]integer?}
+} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
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? or end?[+-]integer?}
+} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
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? or end?[+-]integer?}
+} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
deleteWindows
if {[testConstraint hasEarthPhoto]} {
@@ -3974,6 +3974,14 @@ test menu-38.1 {Can't dismiss ttk::menubutton menu until mouse has hovered over
destroy .top.mb.m .top.m .top
} -result 0
+test menu-39.1 {empty -type - bug be8f5b9fc2} -setup {
+ catch {destroy .m}
+} -body {
+ menu .m -type {}
+} -cleanup {
+ destroy .m
+} -returnCodes error -result {ambiguous type "": must be normal, tearoff, or menubar}
+
# cleanup
imageFinish
diff --git a/tests/menubut.test b/tests/menubut.test
index c2fa2a2..ac479ab 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? or end?[+-]integer?}
+} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""}
test menubutton-1.56 {configuration options} -body {
.mb configure -width 402
.mb cget -width
diff --git a/tests/ttk/combobox.test b/tests/ttk/combobox.test
index b609234..bec5b25 100644
--- a/tests/ttk/combobox.test
+++ b/tests/ttk/combobox.test
@@ -53,7 +53,12 @@ test combobox-2.5 "current -- set to end index" -body {
test combobox-2.6 "current -- set to unknown index" -body {
.cb configure -values [list a b c d e]
.cb current notanindex
-} -returnCodes error -result {Incorrect index notanindex}
+} -returnCodes error -result {bad index "notanindex"}
+
+test combobox-2.7 {current -- set to 0 index when empty [bug 924835c36d]} -body {
+ .cb configure -values {}
+ .cb current 0
+} -returnCodes error -result {index "0" out of range}
test combobox-2.end "Cleanup" -body { destroy .cb }
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index a08fbb5..d2b21dc 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -440,6 +440,15 @@ test ttk-9.8 "-textvariable overrides -text" -body {
.tl cget -text
} -cleanup { destroy .tl } -result "Foo"
+test ttk-9.9 "default for -justify" -body {
+ ttk::label .tl
+ .tl cget -justify
+} -cleanup { destroy .tl } -result "left"
+test ttk-9.10 "default for -anchor" -body {
+ ttk::label .tl
+ .tl cget -anchor
+} -cleanup { destroy .tl } -result "w"
+
#
# Frame widget tests:
#