mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit.rb (Test::Unit::Mini#run_test_suites): ensure
output sync mode to be restored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
98ac9b8667
commit
071e1ba1f8
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Oct 24 14:13:50 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Mini#run_test_suites): ensure
|
||||||
|
output sync mode to be restored.
|
||||||
|
|
||||||
Sun Oct 24 14:11:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Oct 24 14:11:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* vm.c (vm_define_method): defined method is run with the default
|
* vm.c (vm_define_method): defined method is run with the default
|
||||||
|
|
|
@ -156,11 +156,18 @@ module Test
|
||||||
def self.autorun
|
def self.autorun
|
||||||
at_exit {
|
at_exit {
|
||||||
Test::Unit::RunCount.run_once {
|
Test::Unit::RunCount.run_once {
|
||||||
exit(Test::Unit::Mini.new.run(ARGV) || true)
|
exit(Test::Unit::Mini.new.run(ARGV) || true)
|
||||||
}
|
}
|
||||||
} unless @@installed_at_exit
|
} unless @@installed_at_exit
|
||||||
@@installed_at_exit = true
|
@@installed_at_exit = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def run_test_suites(*args)
|
||||||
|
old_sync = @@out.sync if @@out.respond_to?(:sync=)
|
||||||
|
super
|
||||||
|
ensure
|
||||||
|
@@out.sync = old_sync if @@out.respond_to?(:sync=)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue