From b560b080145a477d5d8a00d7e403248b1609cfa1 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 24 Oct 2010 05:18:12 +0000 Subject: [PATCH] * lib/test/unit.rb (Test::Unit::Mini#run_test_suites): show the result even when interrupted on the way. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- lib/test/unit.rb | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7d0fd38cdd..31d804f5e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Sun Oct 24 14:13:50 2010 Nobuyoshi Nakada +Sun Oct 24 14:17:58 2010 Nobuyoshi Nakada + + * 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. diff --git a/lib/test/unit.rb b/lib/test/unit.rb index b5b9f719b1..f7e7246198 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -165,6 +165,8 @@ module Test 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