summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstraptest/runner.rb4
-rw-r--r--lib/test/unit.rb2
-rwxr-xr-x[-rw-r--r--]sample/test.rb4
3 files changed, 5 insertions, 5 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 9341a33..7455e83 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -114,8 +114,8 @@ End
@progress_bs = "\b" * @progress[0].size
@tty = !@verbose && $stderr.tty?
if @tty and /mswin|mingw/ !~ RUBY_PLATFORM and /dumb/ !~ ENV["TERM"]
- @passed = "\e[32m"
- @failed = "\e[31m"
+ @passed = "\e[#{ENV['PASSED_COLOR']||'32'}m"
+ @failed = "\e[#{ENV['FAILED_COLOR']||'31'}m"
@reset = "\e[m"
else
@passed = @failed = @reset = ""
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index b118ec1..85e6885 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -713,7 +713,7 @@ module Test
super
@tty = $stdout.tty?
if @tty and /mswin|mingw/ !~ RUBY_PLATFORM and /dumb/ !~ ENV["TERM"]
- @failed_color = "\e[31m"
+ @failed_color = "\e[#{ENV['FAILED_COLOR']||'31'}m"
@reset_color = "\e[m"
else
@failed_color = @reset_color = ""
diff --git a/sample/test.rb b/sample/test.rb
index cfc02dd..cefdef4 100644..100755
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -11,8 +11,8 @@ PROGRESS.instance_eval do
@bs = "\b" * @rotator[0].size
@tty = STDERR.tty?
if @tty and /mswin|mingw/ !~ RUBY_PLATFORM and /dumb/ !~ ENV["TERM"]
- @passed = "\e[32m"
- @failed = "\e[31m"
+ @passed = "\e[#{ENV['PASSED_COLOR']||'32'}m"
+ @failed = "\e[#{ENV['FAILED_COLOR']||'31'}m"
@reset = "\e[m"
else
@passed = @failed = @reset = ""