summaryrefslogtreecommitdiffstats
path: root/tests/bitmap.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bitmap.test')
-rw-r--r--tests/bitmap.test15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/bitmap.test b/tests/bitmap.test
index 6e2573f..6996f88 100644
--- a/tests/bitmap.test
+++ b/tests/bitmap.test
@@ -15,7 +15,7 @@ test bitmap-1.1 {Tk_AllocBitmapFromObj - converting internal reps} -constraints
testbitmap
} -body {
set x gray25
- lindex $x 0
+ lindex $x 0
button .b -bitmap $x
lindex $x 0
testbitmap gray25
@@ -54,12 +54,12 @@ test bitmap-1.3 {Tk_AllocBitmapFromObj - reuse existing bitmap} -constraints {
test bitmap-2.1 {Tk_GetBitmap procedure} -body {
button .b1 -bitmap bad_name
} -cleanup {
- destroy .b1
+ destroy .b1
} -returnCodes error -result {bitmap "bad_name" not defined}
test bitmap-2.2 {Tk_GetBitmap procedure} -body {
button .b1 -bitmap @xyzzy
} -cleanup {
- destroy .b1
+ destroy .b1
} -returnCodes error -result {error reading bitmap file "xyzzy"}
test bitmap-3.1 {Tk_FreeBitmapFromObj - reference counts} -constraints {
@@ -84,12 +84,14 @@ test bitmap-3.1 {Tk_FreeBitmapFromObj - reference counts} -constraints {
test bitmap-4.1 {FreeBitmapObjProc} -constraints {
testbitmap
+} -setup {
+ proc copy {s} {return [string index $s 0][string range $s 1 end]}
} -body {
- set x [join questhead]
+ set x [copy questhead]
button .b -bitmap $x
- set y [join questhead]
+ set y [copy questhead]
.b configure -bitmap $y
- set z [join questhead]
+ set z [copy questhead]
.b configure -bitmap $z
set result {}
lappend result [testbitmap questhead]
@@ -102,6 +104,7 @@ test bitmap-4.1 {FreeBitmapObjProc} -constraints {
set y bogus
return $result
} -cleanup {
+ rename copy {}
destroy .b
} -result {{{1 3}} {{1 2}} {{1 1}} {}}