summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstraptest/runner.rb2
-rw-r--r--lib/test/unit.rb2
-rwxr-xr-xsample/test.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index c36c5a2..40faa04 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -128,7 +128,7 @@ End
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"
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index ff489d6..7b3554c 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -677,7 +677,7 @@ module Test
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"
diff --git a/sample/test.rb b/sample/test.rb
index ee8bc4a..dcb4cdf 100755
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -24,7 +24,7 @@ PROGRESS.instance_eval do
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"