summaryrefslogtreecommitdiffstats
path: root/tests/message.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/message.test')
-rw-r--r--tests/message.test106
1 files changed, 53 insertions, 53 deletions
diff --git a/tests/message.test b/tests/message.test
index dcffc72..e25bbee 100644
--- a/tests/message.test
+++ b/tests/message.test
@@ -12,8 +12,8 @@ tcltest::loadTestedCommands
eval tcltest::configure $argv
-test message-1.1 {configuration option: "anchor"} -setup {
- message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
+test message-1.1 {configuration option: "anchor"} -setup {
+ message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
@@ -32,10 +32,10 @@ test message-1.2 {configuration option: "anchor"} -setup {
destroy .m
} -returnCodes {error} -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center}
-test message-1.3 {configuration option: "aspect"} -setup {
+test message-1.3 {configuration option: "aspect"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -aspect 3
.m cget -aspect
@@ -52,10 +52,10 @@ test message-1.4 {configuration option: "aspect"} -setup {
destroy .m
} -returnCodes {error} -result {expected integer but got "bogus"}
-test message-1.5 {configuration option: "background"} -setup {
+test message-1.5 {configuration option: "background"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -background #ff0000
.m cget -background
@@ -72,10 +72,10 @@ test message-1.6 {configuration option: "background"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
-test message-1.7 {configuration option: "bd"} -setup {
+test message-1.7 {configuration option: "bd"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -bd 4
.m cget -bd
@@ -92,12 +92,12 @@ test message-1.8 {configuration option: "bd"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
-test message-1.9 {configuration option: "bg"} -setup {
+test message-1.9 {configuration option: "bg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
- .m configure -bg #ff0000
+ .m configure -bg #ff0000
.m cget -bg
} -cleanup {
destroy .m
@@ -112,10 +112,10 @@ test message-1.10 {configuration option: "bg"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
-test message-1.11 {configuration option: "borderwidth"} -setup {
+test message-1.11 {configuration option: "borderwidth"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -borderwidth 1.3
.m cget -borderwidth
@@ -132,10 +132,10 @@ test message-1.12 {configuration option: "borderwidth"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
-test message-1.13 {configuration option: "cursor"} -setup {
+test message-1.13 {configuration option: "cursor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -cursor arrow
.m cget -cursor
@@ -152,10 +152,10 @@ test message-1.14 {configuration option: "cursor"} -setup {
destroy .m
} -returnCodes {error} -result {bad cursor spec "badValue"}
-test message-1.15 {configuration option: "fg"} -setup {
+test message-1.15 {configuration option: "fg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -fg #00ff00
.m cget -fg
@@ -172,10 +172,10 @@ test message-1.16 {configuration option: "fg"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "badValue"}
-test message-1.17 {configuration option: "font"} -setup {
+test message-1.17 {configuration option: "font"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -font fixed
.m cget -font
@@ -192,13 +192,13 @@ test message-1.18 {configuration option: "font"} -setup {
destroy .m
} -returnCodes {error} -result {font "" doesn't exist}
-test message-1.19 {configuration option: "-foreground"} -setup {
+test message-1.19 {configuration option: "-foreground"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -foreground green
- .m cget -foreground
+ .m cget -foreground
} -cleanup {
destroy .m
} -result {green}
@@ -212,10 +212,10 @@ test message-1.20 {configuration option: "-foreground"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "badValue"}
-test message-1.21 {configuration option: "highlightbackground"} -setup {
+test message-1.21 {configuration option: "highlightbackground"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -highlightbackground #112233
.m cget -highlightbackground
@@ -232,13 +232,13 @@ test message-1.22 {configuration option: "highlightbackground"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "ugly"}
-test message-1.23 {configuration option: "highlightcolor"} -setup {
+test message-1.23 {configuration option: "highlightcolor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -highlightcolor #123456
- .m cget -highlightcolor
+ .m cget -highlightcolor
} -cleanup {
destroy .m
} -result {#123456}
@@ -252,13 +252,13 @@ test message-1.24 {configuration option: "highlightcolor"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
-test message-1.25 {configuration option: "highlightthickness"} -setup {
+test message-1.25 {configuration option: "highlightthickness"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -highlightthickness 2
- .m cget -highlightthickness
+ .m cget -highlightthickness
} -cleanup {
destroy .m
} -result {2}
@@ -272,10 +272,10 @@ test message-1.26 {configuration option: "highlightthickness"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
-test message-1.27 {configuration option: "justify"} -setup {
+test message-1.27 {configuration option: "justify"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -justify right
.m cget -justify
@@ -292,13 +292,13 @@ test message-1.28 {configuration option: "justify"} -setup {
destroy .m
} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center}
-test message-1.29 {configuration option: "padx"} -setup {
+test message-1.29 {configuration option: "padx"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -padx 12m
- .m cget -padx
+ .m cget -padx
} -cleanup {
destroy .m
} -result {12m}
@@ -312,10 +312,10 @@ test message-1.30 {configuration option: "padx"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "420x"}
-test message-1.31 {configuration option: "pady"} -setup {
+test message-1.31 {configuration option: "pady"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -pady 12m
.m cget -pady
@@ -332,13 +332,13 @@ test message-1.32 {configuration option: "pady"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "420x"}
-test message-1.33 {configuration option: "relief"} -setup {
+test message-1.33 {configuration option: "relief"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -relief ridge
- .m cget -relief
+ .m cget -relief
} -cleanup {
destroy .m
} -result {ridge}
@@ -352,10 +352,10 @@ test message-1.34 {configuration option: "relief"} -setup {
destroy .m
} -returnCodes {error} -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
-test message-1.35 {configuration options: "text"} -setup {
+test message-1.35 {configuration options: "text"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -text "Sample text"
.m cget -text
@@ -363,24 +363,24 @@ test message-1.35 {configuration options: "text"} -setup {
destroy .m
} -result {Sample text}
-test message-1.36 {configuration option: "textvariable"} -setup {
+test message-1.36 {configuration option: "textvariable"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -textvariable i
- .m cget -textvariable
+ .m cget -textvariable
} -cleanup {
destroy .m
} -result {i}
-test message-1.37 {configuration option: "width"} -setup {
+test message-1.37 {configuration option: "width"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -width 2
- .m cget -width
+ .m cget -width
} -cleanup {
destroy .m
} -result {2}
@@ -403,7 +403,7 @@ test message-2.2 {Tk_MessageObjCmd procedure} -body {
message foo
} -returnCodes {error} -result {bad window path name "foo"}
test message-2.3 {Tk_MessageObjCmd procedure} -body {
- catch {message foo}
+ catch {message foo}
winfo child .
} -result {}
@@ -411,15 +411,15 @@ test message-2.4 {Tk_MessageObjCmd procedure} -body {
message .s -gorp dump
} -returnCodes {error} -result {unknown option "-gorp"}
test message-2.5 {Tk_MessageObjCmd procedure} -body {
- catch {message .s -gorp dump}
+ catch {message .s -gorp dump}
winfo child .
-} -result {}
+} -result {}
test message-3.1 {MessageWidgetObjCmd procedure} -setup {
message .m
} -body {
- .m
+ .m
} -cleanup {
destroy .m
} -returnCodes error -result {wrong # args: should be ".m option ?arg ...?"}
@@ -442,7 +442,7 @@ test message-3.4 {MessageWidgetObjCmd procedure, "configure"} -setup {
message .m
} -body {
.m configure -text foobar
- lindex [.m configure -text] 4
+ lindex [.m configure -text] 4
} -cleanup {
destroy .m
} -result {foobar}