aboutsummaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-17 00:50:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-17 00:50:11 +0000
commitba42dd2b3241b50292ef1a952490209f13a6ec36 (patch)
tree9f9f87823afb6c1690512900d4c1cea0051f722c /bootstraptest
parent25a62e5e41d79043a21d238d7f0f4b502cf34b31 (diff)
downloadruby-ba42dd2b3241b50292ef1a952490209f13a6ec36.tar.gz
default colors
* bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: shared the default colors from test/colors file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rwxr-xr-xbootstraptest/runner.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index fa5e8537e8..d9711fef38 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -136,7 +136,13 @@ End
@tty &&= !@verbose
if @color
# dircolors-like style
- colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {}
+ colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:\n]*)/)] : {}
+ begin
+ File.read(File.join(__dir__, "../test/colors")).scan(/(\w+)=([^:\n]*)/) do |n, c|
+ colors[n] ||= c
+ end
+ rescue
+ end
@passed = "\e[;#{colors["pass"] || "32"}m"
@failed = "\e[;#{colors["fail"] || "31"}m"
@reset = "\e[m"