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:
parent
ea940cc4dc
commit
a9925e2234
1 changed files with 3 additions and 4 deletions
|
@ -589,14 +589,13 @@ EOT
|
||||||
file ||= loc.path
|
file ||= loc.path
|
||||||
line ||= loc.lineno
|
line ||= loc.lineno
|
||||||
end
|
end
|
||||||
line -= 5 # lines until src
|
|
||||||
src = <<eom
|
src = <<eom
|
||||||
# -*- coding: #{src.encoding}; -*-
|
# -*- coding: #{line += __LINE__; src.encoding}; -*-
|
||||||
require #{__dir__.dump};include Test::Unit::Assertions
|
require #{__dir__.dump};include Test::Unit::Assertions
|
||||||
END {
|
END {
|
||||||
puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}"
|
puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}"
|
||||||
}
|
}
|
||||||
#{src}
|
#{line -= __LINE__; src}
|
||||||
class Test::Unit::Runner
|
class Test::Unit::Runner
|
||||||
@@stop_auto_run = true
|
@@stop_auto_run = true
|
||||||
end
|
end
|
||||||
|
@ -621,7 +620,7 @@ eom
|
||||||
else
|
else
|
||||||
res.set_backtrace(caller)
|
res.set_backtrace(caller)
|
||||||
end
|
end
|
||||||
raise res
|
raise res unless SystemExit === res
|
||||||
end
|
end
|
||||||
|
|
||||||
# really is it succeed?
|
# really is it succeed?
|
||||||
|
|
Loading…
Add table
Reference in a new issue