diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-20 11:17:12 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-20 11:17:12 (GMT) |
commit | f6fd3ddeeac87b3138ba636ebb4d408f1a4d284b (patch) | |
tree | 5b43f34ceead813e746ddfbeee77531d798fdfb8 | |
parent | 1b1d4d4c961f622fb32e9a9a9c7fd52ad9a4316c (diff) | |
parent | ac0ac59425874c951ee09237bf6b71a35f732389 (diff) | |
download | tk-f6fd3ddeeac87b3138ba636ebb4d408f1a4d284b.zip tk-f6fd3ddeeac87b3138ba636ebb4d408f1a4d284b.tar.gz tk-f6fd3ddeeac87b3138ba636ebb4d408f1a4d284b.tar.bz2 |
Merge 8.6
-rw-r--r-- | generic/tkTest.c | 12 | ||||
-rw-r--r-- | tests/config.test | 26 |
2 files changed, 19 insertions, 19 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c index a5da898..3cc59b4 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -624,7 +624,7 @@ TestobjconfigObjCmd( {TK_OPTION_BORDER, "-border", "border", "Border", "blue", offsetof(TypesRecord, borderPtr), TCL_INDEX_NONE, TK_CONFIG_NULL_OK, "white", 0x100}, - {TK_OPTION_RELIEF, "-relief", "relief", "Relief", "raised", + {TK_OPTION_RELIEF, "-relief", "relief", "Relief", NULL, offsetof(TypesRecord, reliefPtr), TCL_INDEX_NONE, TK_CONFIG_NULL_OK, 0, 0x200}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", "xterm", @@ -633,9 +633,9 @@ TestobjconfigObjCmd( {TK_OPTION_JUSTIFY, "-justify", NULL, NULL, "left", offsetof(TypesRecord, justifyPtr), TCL_INDEX_NONE, TK_CONFIG_NULL_OK, 0, 0x800}, - {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", NULL, + {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", "center", offsetof(TypesRecord, anchorPtr), TCL_INDEX_NONE, - TK_CONFIG_NULL_OK, 0, 0x1000}, + 0, 0, 0x1000}, {TK_OPTION_PIXELS, "-pixel", "pixel", "Pixel", "1", offsetof(TypesRecord, pixelPtr), TCL_INDEX_NONE, TK_CONFIG_NULL_OK, 0, 0x2000}, @@ -897,7 +897,7 @@ TestobjconfigObjCmd( {TK_OPTION_BORDER, "-border", "border", "Border", "blue", TCL_INDEX_NONE, offsetof(InternalRecord, border), TK_CONFIG_NULL_OK, "white", 0x100}, - {TK_OPTION_RELIEF, "-relief", "relief", "Relief", "raised", + {TK_OPTION_RELIEF, "-relief", "relief", "Relief", NULL, TCL_INDEX_NONE, offsetof(InternalRecord, relief), TK_CONFIG_NULL_OK, 0, 0x200}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", "xterm", @@ -906,9 +906,9 @@ TestobjconfigObjCmd( {TK_OPTION_JUSTIFY, "-justify", NULL, NULL, "left", TCL_INDEX_NONE, offsetof(InternalRecord, justify), TK_CONFIG_NULL_OK, 0, 0x800}, - {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", NULL, + {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", "center", TCL_INDEX_NONE, offsetof(InternalRecord, anchor), - TK_CONFIG_NULL_OK, 0, 0x1000}, + 0, 0, 0x1000}, {TK_OPTION_PIXELS, "-pixel", "pixel", "Pixel", "1", TCL_INDEX_NONE, offsetof(InternalRecord, pixels), TK_CONFIG_NULL_OK, 0, 0x2000}, diff --git a/tests/config.test b/tests/config.test index 3085472..82a342e 100644 --- a/tests/config.test +++ b/tests/config.test @@ -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 { @@ -179,7 +179,7 @@ test config-3.5 {Tk_InitOptions - no initial value} -constraints { testobjconfig } -body { testobjconfig alltypes .a - .a cget -anchor + .a cget -relief } -cleanup { killTables } -result {} @@ -1408,15 +1408,15 @@ test config-8.14 {Tk_RestoreSavedOptions - border internal form} -constraints { } -cleanup { killTables } -result blue -test config-8.15 {Tk_RestoreSavedOptions - relief internal form} -constraints { +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 { @@ -1566,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 { @@ -1587,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} {-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 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 @@ -1613,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 } |