[前][次][番号順一覧][スレッド一覧]

ruby-changes:23685

From: nobu <ko1@a...>
Date: Mon, 21 May 2012 16:05:59 +0900 (JST)
Subject: [ruby-changes:23685] nobu:r35736 (trunk): lib/test/unit.rb: simple ouput if verbose

nobu	2012-05-21 16:05:50 +0900 (Mon, 21 May 2012)

  New Revision: 35736

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35736

  Log:
    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.

  Modified files:
    trunk/lib/test/unit.rb

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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]