aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-20 10:10:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-20 10:10:08 +0000
commite9624598958c08b595a42f3fbb553a96de0ccb94 (patch)
tree74308993cf68c3f6c4c72348843ff6fee5b48d3c /test/lib
parent8b8bb4ba01d9ea255db09ca0644fedf60771af3e (diff)
downloadruby-e9624598958c08b595a42f3fbb553a96de0ccb94.tar.gz
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
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/test/unit/assertions.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index d605d7997f..7a16be2ed9 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -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?