summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstraptest/runner.rb5
-rwxr-xr-xsample/test.rb5
2 files changed, 6 insertions, 4 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 42340f9..965c335 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -82,8 +82,9 @@ def main
true
when /\A(--stress|-s)/
$stress = true
- when /\A--color(?:=(?:always|(auto)|(never)))?\z/
- @color = (!$2 unless $1)
+ when /\A--color(?:=(?:always|(auto)|(never)|(.*)))?\z/
+ warn "unknown --color argument: #$3" if $3
+ @color = $1 ? nil : !$2
true
when /\A(-q|--q(uiet))\z/
quiet = true
diff --git a/sample/test.rb b/sample/test.rb
index b32a164..839343e 100755
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -8,8 +8,9 @@ PROGRESS = Object.new
PROGRESS.instance_eval do
@color = nil
case ARGV[0]
- when /\A--color(?:=(?:always|(auto)|(never)))?\z/
- @color = (!$2 unless $1)
+ when /\A--color(?:=(?:always|(auto)|(never)|(.*)))?\z/
+ warn "unknown --color argument: #$3" if $3
+ @color = $1 ? nil : !$2
end
@count = 0
@rotator = %w[- \\ | /]