[前][次][番号順一覧][スレッド一覧]

ruby-changes:24046

From: nobu <ko1@a...>
Date: Fri, 15 Jun 2012 10:38:42 +0900 (JST)
Subject: [ruby-changes:24046] nobu:r36097 (trunk): test: TEST_COLORS

nobu	2012-06-15 10:38:32 +0900 (Fri, 15 Jun 2012)

  New Revision: 36097

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36097

  Log:
    test: TEST_COLORS
    
    * bootstraptest/runner.rb (main): fixed typo.
    * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): ditto.
    * sample/test.rb: ditto.

  Modified files:
    trunk/bootstraptest/runner.rb
    trunk/lib/test/unit.rb
    trunk/sample/test.rb

Index: bootstraptest/runner.rb
===================================================================
--- bootstraptest/runner.rb	(revision 36096)
+++ bootstraptest/runner.rb	(revision 36097)
@@ -128,7 +128,7 @@
   end
   if @color
     # 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"
     @failed = "\e[#{colors["fail"] || "31"}m"
     @reset = "\e[m"
Index: sample/test.rb
===================================================================
--- sample/test.rb	(revision 36096)
+++ sample/test.rb	(revision 36097)
@@ -24,7 +24,7 @@
   end
   if @color
     # 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"
     @failed = "\e[#{colors["fail"] || "31"}m"
     @reset = "\e[m"
Index: lib/test/unit.rb
===================================================================
--- lib/test/unit.rb	(revision 36096)
+++ lib/test/unit.rb	(revision 36097)
@@ -677,7 +677,7 @@
         end
         if color
           # 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"
           @failed_color = "\e[#{colors["fail"] || "31"}m"
           @skipped_color = "\e[#{colors["skip"] || "33"}m"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]