summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-15 00:56:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-15 00:56:36 +0000
commit65672e63f52dc09c62eb2b75d5d24f710a30ee6e (patch)
tree20202c195ef900c5a73fcb01aea7bfdc9a2f8996
parenta8ddde3b7802702414a7ea602720199de76051f1 (diff)
test: unknown --color argument
* bootstraptest/runner.rb (main): warn unknown --color argument. * sample/test.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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[- \\ | /]