summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/color.test17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/color.test b/tests/color.test
index 6b31df7..a7ed1f8 100644
--- a/tests/color.test
+++ b/tests/color.test
@@ -70,8 +70,8 @@ proc closest {w r g b} {
# vals - List of intensities.
proc c255 {vals} {
- list [expr [lindex $vals 0]/256] [expr [lindex $vals 1]/256] \
- [expr [lindex $vals 2]/256]
+ list [expr {[lindex $vals 0]/256}] [expr {[lindex $vals 1]/256}] \
+ [expr {[lindex $vals 2]/256}]
}
# colorsFree --
@@ -149,6 +149,19 @@ test color-1.4 {Tk_AllocColorFromObj - try other colors in list} colorsFree {
pack .b2 -side top
lappend result [testcolor purple]
} {{{1 1}} {{1 1} {1 0}} {{1 0} {2 1}}}
+test color-1.5 {Color table} nonPortable {
+ set fd [open ../xlib/rgb.txt]
+ set result {}
+ while {[gets $fd line] != -1} {
+ if {[string index $line 0] == "!"} continue
+ set rgb [c255 [winfo rgb . [lrange $line 3 end]]]
+ if {$rgb != [lrange $line 0 2] } {
+ append result $line\n
+ }
+
+ }
+ return $result
+} {}
test color-2.1 {Tk_GetColor procedure} colorsFree {
c255 [winfo rgb .t #FF0000]