ruby-changes:17575
From: nobu <ko1@a...>
Date: Sun, 24 Oct 2010 14:18:19 +0900 (JST)
Subject: [ruby-changes:17575] Ruby:r29580 (trunk): * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): show the
nobu 2010-10-24 14:18:12 +0900 (Sun, 24 Oct 2010) New Revision: 29580 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29580 Log: * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): show the result even when interrupted on the way. Modified files: trunk/ChangeLog trunk/lib/test/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 29579) +++ ChangeLog (revision 29580) @@ -1,5 +1,8 @@ -Sun Oct 24 14:13:50 2010 Nobuyoshi Nakada <nobu@r...> +Sun Oct 24 14:17:58 2010 Nobuyoshi Nakada <nobu@r...> + * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): show the + result even when interrupted on the way. + * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): ensure output sync mode to be restored. Index: lib/test/unit.rb =================================================================== --- lib/test/unit.rb (revision 29579) +++ lib/test/unit.rb (revision 29580) @@ -165,6 +165,8 @@ def run_test_suites(*args) old_sync = @@out.sync if @@out.respond_to?(:sync=) super + rescue Interrupt + [@test_count, @assertion_count] ensure @@out.sync = old_sync if @@out.respond_to?(:sync=) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/