diff options
author | antirez <antirez@gmail.com> | 2014-02-17 17:36:50 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-02-17 17:36:50 +0100 |
commit | 34c404e069644336325fb568860cb8248d054089 (patch) | |
tree | e488ece517ddd6a3f453b226bfce59216c0bf4d0 /tests/support/test.tcl | |
parent | a1dca2efab3e5b18054072e487f6f54814fd8992 (diff) | |
download | redis-34c404e069644336325fb568860cb8248d054089.tar.gz |
Test: colorstr moved to util.tcl.
Diffstat (limited to 'tests/support/test.tcl')
-rw-r--r-- | tests/support/test.tcl | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/support/test.tcl b/tests/support/test.tcl index 480c674e0..96b529d7a 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -61,36 +61,6 @@ proc wait_for_condition {maxtries delay e _else_ elsescript} { } } -# Test if TERM looks like to support colors -proc color_term {} { - expr {[info exists ::env(TERM)] && [string match *xterm* $::env(TERM)]} -} - -proc colorstr {color str} { - if {[color_term]} { - set b 0 - if {[string range $color 0 4] eq {bold-}} { - set b 1 - set color [string range $color 5 end] - } - switch $color { - red {set colorcode {31}} - green {set colorcode {32}} - yellow {set colorcode {33}} - blue {set colorcode {34}} - magenta {set colorcode {35}} - cyan {set colorcode {36}} - white {set colorcode {37}} - default {set colorcode {37}} - } - if {$colorcode ne {}} { - return "\033\[$b;${colorcode};40m$str\033\[0m" - } - } else { - return $str - } -} - proc test {name code {okpattern undefined}} { # abort if tagged with a tag to deny foreach tag $::denytags { |