ruby-changes:38435
From: nobu <ko1@a...>
Date: Sun, 17 May 2015 09:50:15 +0900 (JST)
Subject: [ruby-changes:38435] nobu:r50516 (trunk): reset colors
nobu 2015-05-17 09:50:02 +0900 (Sun, 17 May 2015) New Revision: 50516 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50516 Log: reset colors * bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: reset for each colors. Modified files: trunk/bootstraptest/runner.rb trunk/sample/test.rb trunk/test/lib/test/unit.rb Index: bootstraptest/runner.rb =================================================================== --- bootstraptest/runner.rb (revision 50515) +++ bootstraptest/runner.rb (revision 50516) @@ -137,8 +137,8 @@ End https://github.com/ruby/ruby/blob/trunk/bootstraptest/runner.rb#L137 if @color # dircolors-like style colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {} - @passed = "\e[#{colors["pass"] || "32"}m" - @failed = "\e[#{colors["fail"] || "31"}m" + @passed = "\e[;#{colors["pass"] || "32"}m" + @failed = "\e[;#{colors["fail"] || "31"}m" @reset = "\e[m" else @passed = @failed = @reset = "" Index: sample/test.rb =================================================================== --- sample/test.rb (revision 50515) +++ sample/test.rb (revision 50516) @@ -34,8 +34,8 @@ class Progress https://github.com/ruby/ruby/blob/trunk/sample/test.rb#L34 if @color # dircolors-like style colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {} - @passed = "\e[#{colors["pass"] || "32"}m" - @failed = "\e[#{colors["fail"] || "31"}m" + @passed = "\e[;#{colors["pass"] || "32"}m" + @failed = "\e[;#{colors["fail"] || "31"}m" @reset = "\e[m" else @passed = @failed = @reset = "" Index: test/lib/test/unit.rb =================================================================== --- test/lib/test/unit.rb (revision 50515) +++ test/lib/test/unit.rb (revision 50516) @@ -597,9 +597,9 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L597 if color # dircolors-like style colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {} - @passed_color = "\e[#{colors["pass"] || "32"}m" - @failed_color = "\e[#{colors["fail"] || "31"}m" - @skipped_color = "\e[#{colors["skip"] || "33"}m" + @passed_color = "\e[;#{colors["pass"] || "32"}m" + @failed_color = "\e[;#{colors["fail"] || "31"}m" + @skipped_color = "\e[;#{colors["skip"] || "33"}m" @reset_color = "\e[m" else @passed_color = @failed_color = @skipped_color = @reset_color = "" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/