reset colors

* bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb:
  reset for each colors.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-05-17 00:50:02 +00:00
parent 1fc214c04d
commit 75a865406f
3 changed files with 7 additions and 7 deletions

View File

@ -137,8 +137,8 @@ End
if @color if @color
# dircolors-like style # dircolors-like style
colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {} colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {}
@passed = "\e[#{colors["pass"] || "32"}m" @passed = "\e[;#{colors["pass"] || "32"}m"
@failed = "\e[#{colors["fail"] || "31"}m" @failed = "\e[;#{colors["fail"] || "31"}m"
@reset = "\e[m" @reset = "\e[m"
else else
@passed = @failed = @reset = "" @passed = @failed = @reset = ""

View File

@ -34,8 +34,8 @@ class Progress
if @color if @color
# dircolors-like style # dircolors-like style
colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {} colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {}
@passed = "\e[#{colors["pass"] || "32"}m" @passed = "\e[;#{colors["pass"] || "32"}m"
@failed = "\e[#{colors["fail"] || "31"}m" @failed = "\e[;#{colors["fail"] || "31"}m"
@reset = "\e[m" @reset = "\e[m"
else else
@passed = @failed = @reset = "" @passed = @failed = @reset = ""

View File

@ -597,9 +597,9 @@ module Test
if color if color
# dircolors-like style # dircolors-like style
colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {} colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {}
@passed_color = "\e[#{colors["pass"] || "32"}m" @passed_color = "\e[;#{colors["pass"] || "32"}m"
@failed_color = "\e[#{colors["fail"] || "31"}m" @failed_color = "\e[;#{colors["fail"] || "31"}m"
@skipped_color = "\e[#{colors["skip"] || "33"}m" @skipped_color = "\e[;#{colors["skip"] || "33"}m"
@reset_color = "\e[m" @reset_color = "\e[m"
else else
@passed_color = @failed_color = @skipped_color = @reset_color = "" @passed_color = @failed_color = @skipped_color = @reset_color = ""