diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-12 17:15:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-12 17:15:25 (GMT) |
commit | 3d433cf153871eb9242c3a8010ef6958007d346a (patch) | |
tree | 93f512b424ad526015994c9dca6c8157addcc97a /tests/config.test | |
parent | c209a036551118943a96fa6317ce447be1ec4b2b (diff) | |
download | tk-3d433cf153871eb9242c3a8010ef6958007d346a.zip tk-3d433cf153871eb9242c3a8010ef6958007d346a.tar.gz tk-3d433cf153871eb9242c3a8010ef6958007d346a.tar.bz2 |
Add new non-regression test config-4.29a. Formatting
Diffstat (limited to 'tests/config.test')
-rw-r--r-- | tests/config.test | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/tests/config.test b/tests/config.test index 9fd048a..22c4274 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 { @@ -235,7 +235,7 @@ test config-4.2 {DoObjConfig - boolean} -constraints testobjconfig -setup { .foo cget -boolean } -cleanup { killTables -} -returnCodes ok -result {0} +} -returnCodes ok -result 0 test config-4.3 {DoObjConfig - boolean} -constraints testobjconfig -setup { catch {rename .foo {}} } -body { @@ -259,7 +259,7 @@ test config-4.5 {DoObjConfig - boolean} -constraints testobjconfig -setup { .foo cget -boolean } -cleanup { killTables -} -returnCodes ok -result {1} +} -returnCodes ok -result 1 test config-4.6 {DoObjConfig - boolean} -constraints testobjconfig -setup { catch {rename .foo {}} } -body { @@ -287,7 +287,7 @@ test config-4.8 {DoObjConfig - boolean internal value} -constraints { .foo cget -boolean } -cleanup { killTables -} -result {0} +} -result 0 test config-4.9 {DoObjConfig - integer} -constraints testobjconfig -setup { catch {rename .foo {}} @@ -303,7 +303,7 @@ test config-4.10 {DoObjConfig - integer} -constraints testobjconfig -setup { .foo cget -integer } -cleanup { killTables -} -returnCodes ok -result {3} +} -returnCodes ok -result 3 test config-4.11 {DoObjConfig - integer} -constraints testobjconfig -setup { catch {rename .foo {}} } -body { @@ -333,7 +333,7 @@ test config-4.13 {DoObjConfig - integer internal value} -constraints { .foo cget -integer } -cleanup { killTables -} -result {421} +} -result 421 test config-4.14 {DoObjConfig - double} -constraints testobjconfig -setup { catch {rename .foo {}} @@ -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 { @@ -472,7 +478,7 @@ test config-4.30 {DoObjConfig - new string table} -constraints { .foo configure -stringtable three } -cleanup { killTables -} -returnCodes ok -result {16} +} -returnCodes ok -result 16 test config-4.31 {DoObjConfig - new string table} -constraints { testobjconfig } -body { @@ -564,7 +570,7 @@ test config-4.42 {DoObjConfig - getting rid of old color} -constraints { .foo configure -color #444444 } -cleanup { killTables -} -returnCodes ok -result {32} +} -returnCodes ok -result 32 test config-4.43 {DoObjConfig - getting rid of old color} -constraints { testobjconfig } -body { @@ -607,7 +613,7 @@ test config-4.47 {DoObjConfig - new font} -constraints testobjconfig -setup { .foo configure -font {Helvetica 72} } -cleanup { killTables -} -returnCodes ok -result {64} +} -returnCodes ok -result 64 test config-4.48 {DoObjConfig - new font} -constraints testobjconfig -setup { catch {rename .foo {}} } -body { @@ -668,7 +674,7 @@ test config-4.55 {DoObjConfig - new bitmap} -constraints testobjconfig -body { .foo configure -bitmap gray50 } -cleanup { killTables -} -returnCodes ok -result {128} +} -returnCodes ok -result 128 test config-4.56 {DoObjConfig - new bitmap} -constraints testobjconfig -body { testobjconfig alltypes .foo -bitmap gray75 .foo configure -bitmap gray50 @@ -751,7 +757,7 @@ test config-4.67 {DoObjConfig - getting rid of old border} -constraints { .foo configure -border #444444 } -cleanup { killTables -} -returnCodes ok -result {256} +} -returnCodes ok -result 256 test config-4.68 {DoObjConfig - getting rid of old border} -constraints { testobjconfig } -body { @@ -793,7 +799,7 @@ test config-4.73 {DoObjConfig - new relief} -constraints testobjconfig -body { .foo configure -relief flat } -cleanup { killTables -} -returnCodes ok -result {512} +} -returnCodes ok -result 512 test config-4.74 {DoObjConfig - new relief} -constraints testobjconfig -body { testobjconfig alltypes .foo -relief raised .foo configure -relief flat @@ -838,7 +844,7 @@ test config-4.80 {DoObjConfig - new cursor} -constraints testobjconfig -body { .foo configure -cursor arrow } -cleanup { killTables -} -returnCodes ok -result {1024} +} -returnCodes ok -result 1024 test config-4.81 {DoObjConfig - new cursor} -constraints testobjconfig -body { testobjconfig alltypes .foo -cursor xterm .foo configure -cursor arrow @@ -878,7 +884,7 @@ test config-4.86 {DoObjConfig - new justify} -constraints testobjconfig -body { .foo configure -justify right } -cleanup { killTables -} -returnCodes ok -result {2048} +} -returnCodes ok -result 2048 test config-4.87 {DoObjConfig - new justify} -constraints testobjconfig -body { testobjconfig alltypes .foo -justify left .foo configure -justify right @@ -918,7 +924,7 @@ test config-4.92 {DoObjConfig - new anchor} -constraints testobjconfig -body { .foo configure -anchor n } -cleanup { killTables -} -returnCodes ok -result {4096} +} -returnCodes ok -result 4096 test config-4.93 {DoObjConfig - new anchor} -constraints testobjconfig -body { testobjconfig alltypes .foo -anchor e .foo configure -anchor n @@ -946,7 +952,7 @@ test config-4.96 {DoObjConfig - pixel} -constraints testobjconfig -body { .foo cget -pixel } -cleanup { killTables -} -returnCodes ok -result {42} +} -returnCodes ok -result 42 test config-4.97 {DoObjConfig - invalid pixel} -constraints testobjconfig -body { testobjconfig alltypes .foo -pixel foo } -cleanup { @@ -957,7 +963,7 @@ test config-4.98 {DoObjConfig - new pixel} -constraints testobjconfig -body { .foo configure -pixel 3c } -cleanup { killTables -} -returnCodes ok -result {8192} +} -returnCodes ok -result 8192 test config-4.99 {DoObjConfig - new pixel} -constraints testobjconfig -body { testobjconfig alltypes .foo -pixel 42m .foo configure -pixel 3c @@ -976,7 +982,7 @@ test config-4.100 {DoObjConfig - pixel internal value} -constraints { expr {$screenW eq $result} } -cleanup { killTables -} -result {1} +} -result 1 test config-4.101 {DoObjConfig - window} -constraints testobjconfig -body { toplevel .bar @@ -1017,7 +1023,7 @@ test config-4.106 {DoObjConfig - new window} -constraints testobjconfig -body { .foo configure -window .blamph } -cleanup { killTables -} -returnCodes ok -result {0} +} -returnCodes ok -result 0 test config-4.107 {DoObjConfig - new window} -constraints testobjconfig -body { toplevel .bar toplevel .blamph @@ -1258,7 +1264,7 @@ test config-7.11 {Tk_SetOptions - synonym name in error message} -constraints { ".a configure -synonym bogus"} test config-7.12 {Tk_SetOptions - returning mask} -constraints testobjconfig -body { format %x [.a configure -color red -int 7 -relief raised -double 3.14159] -} -result {226} +} -result 226 test config-7.13 {Tk_SetOptions - error in DoObjConfig with custom option} -constraints { testobjconfig } -body { @@ -1304,7 +1310,7 @@ test config-8.3 {Tk_RestoreSavedOptions - freeing object memory} -constraints { .a csave -color green -color black -color blue -color #ffff00 -color #ff00ff } -cleanup { killTables -} -result {32} +} -result 32 test config-8.4 {Tk_RestoreSavedOptions - boolean internal form} -constraints { testobjconfig } -body { @@ -1321,7 +1327,7 @@ test config-8.5 {Tk_RestoreSavedOptions - boolean internal form} -constraints { .a cget -boolean } -cleanup { killTables -} -result {1} +} -result 1 test config-8.6 {Tk_RestoreSavedOptions - integer internal form} -constraints { testobjconfig } -body { @@ -1338,7 +1344,7 @@ test config-8.7 {Tk_RestoreSavedOptions - integer internal form} -constraints { .a cget -integer } -cleanup { killTables -} -result {148962237} +} -result 148962237 test config-8.8 {Tk_RestoreSavedOptions - double internal form} -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 raised raised} {-cursor cursor Cursor xterm xterm} {-justify {} {} left left} {-anchor anchor Anchor {} {}} {-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 @@ -1620,11 +1626,11 @@ if {[testConstraint testobjconfig]} { test config-12.1 {GetObjectForOption - boolean} -constraints testobjconfig -body { .a configure -boolean 0 .a cget -boolean -} -result {0} +} -result 0 test config-12.2 {GetObjectForOption - integer} -constraints testobjconfig -body { .a configure -integer 1247 .a cget -integer -} -result {1247} +} -result 1247 test config-12.3 {GetObjectForOption - double} -constraints testobjconfig -body { .a configure -double -88.82 .a cget -double @@ -1680,7 +1686,7 @@ test config-12.13 {GetObjectForOption - anchor} -constraints testobjconfig -body test config-12.14 {GetObjectForOption - pixels} -constraints testobjconfig -body { .a configure -pixel 193.2 .a cget -pixel -} -result {193} +} -result 193 test config-12.15 {GetObjectForOption - window} -constraints testobjconfig -body { .a configure -window .a .a cget -window |