summaryrefslogtreecommitdiffstats
path: root/tests/imgBmap.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/imgBmap.test')
-rw-r--r--tests/imgBmap.test43
1 files changed, 16 insertions, 27 deletions
diff --git a/tests/imgBmap.test b/tests/imgBmap.test
index 5ffd7c4..4dd035e 100644
--- a/tests/imgBmap.test
+++ b/tests/imgBmap.test
@@ -40,23 +40,23 @@ imageCleanup
#image create bitmap i1
#.c create image 200 100 -image i1
update
-proc bgerror msg {
+proc bgerror {msg} {
global errMsg
set errMsg $msg
}
test imageBmap-1.1 {options for bitmap images} -body {
- image create bitmap i1 -background #123456
+ image create bitmap i1 -background "#123456"
lindex [i1 configure -background] 4
} -cleanup {
image delete i1
-} -result {#123456}
+} -result "#123456"
test imageBmap-1.2 {options for bitmap images} -setup {
destroy .c
pack [canvas .c]
update
} -body {
- set errMsg {}
+ set errMsg ""
image create bitmap i1 -background lousy
.c create image 200 100 -image i1
update
@@ -81,11 +81,11 @@ test imageBmap-1.6 {options for bitmap images} -body {
list [catch {image create bitmap i1 -file bogus} msg] [string tolower $msg]
} -result {1 {couldn't read bitmap file "bogus": no such file or directory}}
test imageBmap-1.7 {options for bitmap images} -body {
- image create bitmap i1 -foreground #00ff00
+ image create bitmap i1 -foreground "#00ff00"
lindex [i1 configure -foreground] 4
} -cleanup {
image delete i1
-} -result {#00ff00}
+} -result "#00ff00"
test imageBmap-1.8 {options for bitmap images} -setup {
destroy .c
pack [canvas .c]
@@ -116,8 +116,7 @@ test imageBmap-1.12 {options for bitmap images} -body {
list [catch {image create bitmap i1 -data $data1 -maskfile bogus} msg] \
[string tolower $msg]
} -result {1 {couldn't read bitmap file "bogus": no such file or directory}}
-rename bgerror {}
-
+rename bgerror ""
test imageBmap-2.1 {ImgBmapCreate procedure} -setup {
imageCleanup
@@ -136,13 +135,12 @@ test imageBmap-2.2 {ImgBmapCreate procedure} -setup {
image delete image1
} -result {image1 image1 0 0 #000000 {}}
-
test imageBmap-3.1 {ImgBmapConfigureMaster procedure, memory de-allocation} -body {
image create bitmap i1 -data $data1
i1 configure -data $data1
} -cleanup {
image delete i1
-} -result {}
+} -result ""
test imageBmap-3.2 {ImgBmapConfigureMaster procedure} -body {
image create bitmap i1 -data $data1
list [catch {i1 configure -data bogus} msg] $msg [image width i1] \
@@ -153,7 +151,7 @@ test imageBmap-3.3 {ImgBmapConfigureMaster procedure, memory de-allocation} -bod
i1 configure -maskdata $data2
} -cleanup {
image delete i1
-} -result {}
+} -result ""
test imageBmap-3.4 {ImgBmapConfigureMaster procedure} -body {
image create bitmap i1
i1 configure -maskdata $data2
@@ -200,7 +198,6 @@ test imageBmap-3.7 {ImgBmapConfigureMaster procedure} -setup {
destroy .c
} -result {15 14 {100 100 115 114} {200 100 215 114}}
-
test imageBmap-4.1 {ImgBmapConfigureInstance procedure: check error handling} -setup {
destroy .c
pack [canvas .c]
@@ -215,8 +212,7 @@ test imageBmap-4.1 {ImgBmapConfigureInstance procedure: check error handling} -s
} -cleanup {
image delete i1
destroy .c
-} -result {}
-
+} -result ""
test imageBmap-5.1 {GetBitmapData procedure} -body {
list [catch {image create bitmap -file ~bad_user/a/b} msg] \
@@ -330,7 +326,6 @@ test imageBmap-5.17 {GetBitmapData procedure} -setup {imageCleanup} -body {
"
} -returnCodes error -result {format error in bitmap data}
-
test imageBmap-6.1 {NextBitmapWord procedure} -setup {imageCleanup} -body {
image create bitmap i1 -data {1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890}
} -returnCodes error -result {format error in bitmap data}
@@ -344,7 +339,6 @@ test imageBmap-6.3 {NextBitmapWord procedure} -setup {imageCleanup} -body {
} -returnCodes error -result {format error in bitmap data}
removeFile foo3.bm
-
imageCleanup
# Image used in 7.* tests
image create bitmap i1
@@ -381,7 +375,6 @@ test imageBmap-7.10 {ImgBmapCmd procedure} -body {
i1 gorp
} -returnCodes error -result {bad option "gorp": must be cget or configure}
-
test imageBmap-8.1 {ImgBmapGet/Free procedures, shared instances} -setup {
destroy .c
pack [canvas .c]
@@ -404,8 +397,7 @@ test imageBmap-8.1 {ImgBmapGet/Free procedures, shared instances} -setup {
image delete i1
} -cleanup {
destroy .c
-} -result {}
-
+} -result ""
test imageBmap-9.1 {ImgBmapDisplay procedure, nothing to display} -setup {
destroy .c
@@ -421,7 +413,7 @@ test imageBmap-9.1 {ImgBmapDisplay procedure, nothing to display} -setup {
} -cleanup {
image delete i1
destroy .c
-} -result {}
+} -result ""
test imageBmap-9.2 {ImgBmapDisplay procedure, nothing to display} -setup {
destroy .c
pack [canvas .c]
@@ -437,12 +429,11 @@ test imageBmap-9.2 {ImgBmapDisplay procedure, nothing to display} -setup {
} -cleanup {
image delete i1
destroy .c
-} -result {}
+} -result ""
if {[info exists bgerror]} {
rename bgerror {}
}
-
test imageBmap-10.1 {ImgBmapFree procedure, resource freeing} -setup {
destroy .c
pack [canvas .c]
@@ -457,7 +448,7 @@ test imageBmap-10.1 {ImgBmapFree procedure, resource freeing} -setup {
image delete i1
} -cleanup {
destroy .c
-} -result {}
+} -result ""
test imageBmap-10.2 {ImgBmapFree procedures, unlinking} -setup {
destroy .c
pack [canvas .c]
@@ -482,14 +473,13 @@ test imageBmap-10.2 {ImgBmapFree procedures, unlinking} -setup {
} -cleanup {
image delete i1
deleteWindows
-} -result {}
-
+} -result ""
test imageBmap-11.1 {ImgBmapDelete procedure} -body {
image create bitmap i2 -file foo.bm -maskfile foo2.bm
image delete i2
info command i2
-} -result {}
+} -result ""
test imageBmap-11.2 {ImgBmapDelete procedure} -body {
image create bitmap i2 -file foo.bm -maskfile foo2.bm
rename i2 newi2
@@ -498,7 +488,6 @@ test imageBmap-11.2 {ImgBmapDelete procedure} -body {
lappend x [info command new*]
} -result {{} newi2 foo.bm {}}
-
test imageBmap-12.1 {ImgBmapCmdDeletedProc procedure} -body {
image create bitmap i2 -file foo.bm -maskfile foo2.bm
rename i2 {}