summaryrefslogtreecommitdiff
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
commita9925e2234cf1f72722d7e1fd8c134e321b894cf (patch)
tree74308993cf68c3f6c4c72348843ff6fee5b48d3c /test/lib
parentea940cc4dcff8d6c345d7015eda0bf06671f87e9 (diff)
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?