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

ruby-changes:41124

From: nobu <ko1@a...>
Date: Sat, 19 Dec 2015 10:18:16 +0900 (JST)
Subject: [ruby-changes:41124] nobu:r53197 (trunk): test/unit.rb: color on tty

nobu	2015-12-19 10:17:47 +0900 (Sat, 19 Dec 2015)

  New Revision: 53197

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

  Log:
    test/unit.rb: color on tty
    
    * test/lib/test/unit.rb (Test::Unit::StatusLine#_prepare_run):
      colorize by default on tty.

  Modified files:
    trunk/test/lib/test/unit.rb
Index: test/lib/test/unit.rb
===================================================================
--- test/lib/test/unit.rb	(revision 53196)
+++ test/lib/test/unit.rb	(revision 53197)
@@ -565,7 +565,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L565
         when :always
           color = true
         when :auto, nil
-          color = @options[:job_status] == :replace && /dumb/ !~ ENV["TERM"]
+          color = (@tty || @options[:job_status] == :replace) && /dumb/ !~ ENV["TERM"]
         else
           color = false
         end

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

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