1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2012-06-15 00:56:36 +00:00
parent a8ddde3b78
commit 65672e63f5
2 changed files with 6 additions and 4 deletions

View file

@ -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

View file

@ -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[- \\ | /]