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

lib/test/unit.rb: simple ouput if verbose

* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): use simple
  output if verbose mode and no job-status option given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-05-21 07:05:50 +00:00
parent 51a929c66d
commit 9c14029fce

View file

@ -65,7 +65,7 @@ module Test
opts.version = MiniTest::Unit::VERSION opts.version = MiniTest::Unit::VERSION
options[:retry] = true options[:retry] = true
options[:job_status] ||= :replace if @tty options[:job_status] = nil
opts.on '-h', '--help', 'Display this help.' do opts.on '-h', '--help', 'Display this help.' do
puts opts puts opts
@ -666,6 +666,7 @@ module Test
end end
def _prepare_run(suites, type) def _prepare_run(suites, type)
options[:job_status] ||= @tty && !options[:verbose] ? :replace : :normal
case options[:color] case options[:color]
when :always when :always
color = true color = true
@ -681,7 +682,7 @@ module Test
else else
@failed_color = @reset_color = "" @failed_color = @reset_color = ""
end end
if @options[:job_status] == :replace if color or @options[:job_status] == :replace
@verbose = !options[:parallel] @verbose = !options[:parallel]
@output = StatusLineOutput.new(self) @output = StatusLineOutput.new(self)
end end