summaryrefslogtreecommitdiffstats
path: root/tests/color.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-12-02 20:58:36 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-12-02 20:58:36 (GMT)
commitc9609fa27feeb754fbbaa92539825a04d2c4d7f6 (patch)
treeb930b1bbb5af0c099e7820db368689fc760e3d9e /tests/color.test
parentfd7ab722c98be2bee1064d8721bbcae710a74f14 (diff)
downloadtk-c9609fa27feeb754fbbaa92539825a04d2c4d7f6.zip
tk-c9609fa27feeb754fbbaa92539825a04d2c4d7f6.tar.gz
tk-c9609fa27feeb754fbbaa92539825a04d2c4d7f6.tar.bz2
Fix [ad98f10b3a] and [bd0017bf79] - bitmap-4.1 and cursor-4.1 tests failures. Also, apply again the same pattern to fix color-4.1 that was also failing (when the colorsFree constraint was met) despite there was no such report (yet). Thanks to dgp.
Diffstat (limited to 'tests/color.test')
-rw-r--r--tests/color.test16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/color.test b/tests/color.test
index 237ec01..0b328cf 100644
--- a/tests/color.test
+++ b/tests/color.test
@@ -255,13 +255,17 @@ test color-3.4 {Tk_FreeColorFromObj - unlinking from list} colorsFree {
lappend result [testcolor purple]
} {{{4 1} {3 0} {2 0} {1 0}} {{4 1} {2 0} {1 0}} {{4 1} {2 0}} {{2 0}} {}}
-test color-4.1 {FreeColorObjProc} colorsFree {
+test color-4.1 {FreeColorObjProc} -constraints {
+ colorsFree
+} -setup {
+ proc copy {s} {return [string index $s 0][string range $s 1 end]}
+} -body {
destroy .b
- set x [format purple]
+ set x [copy purple]
button .b -foreground $x -text .b1
- set y [format purple]
+ set y [copy purple]
.b configure -foreground $y
- set z [format purple]
+ set z [copy purple]
.b configure -foreground $z
set result {}
lappend result [testcolor purple]
@@ -273,7 +277,9 @@ test color-4.1 {FreeColorObjProc} colorsFree {
lappend result [testcolor purple]
set y bogus
set result
-} {{{1 3}} {{1 2}} {{1 1}} {}}
+} -cleanup {
+ rename copy {}
+} -result {{{1 3}} {{1 2}} {{1 1}} {}}
destroy .t