1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

assertions.rb: ignore exit in child

* test/lib/test/unit/assertions.rb (assert_separately): ignore
  SystemExit.  unsuccessful exit still fails an assertion later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-02-20 10:10:08 +00:00
parent ea940cc4dc
commit a9925e2234

View file

@ -589,14 +589,13 @@ EOT
file ||= loc.path
line ||= loc.lineno
end
line -= 5 # lines until src
src = <<eom
# -*- coding: #{src.encoding}; -*-
# -*- coding: #{line += __LINE__; src.encoding}; -*-
require #{__dir__.dump};include Test::Unit::Assertions
END {
puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}"
}
#{src}
#{line -= __LINE__; src}
class Test::Unit::Runner
@@stop_auto_run = true
end
@ -621,7 +620,7 @@ eom
else
res.set_backtrace(caller)
end
raise res
raise res unless SystemExit === res
end
# really is it succeed?