diff options
Diffstat (limited to 'test/envutil.rb')
-rw-r--r-- | test/envutil.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/envutil.rb b/test/envutil.rb index ac2a3c0c..a4964c2c 100644 --- a/test/envutil.rb +++ b/test/envutil.rb @@ -365,7 +365,7 @@ module Test file ||= loc.path line ||= loc.lineno end - line -= 5 # lines until src + line -= 6 # lines until src src = <<eom # -*- coding: #{src.encoding}; -*- require 'test/unit';include Test::Unit::Assertions @@ -373,6 +373,7 @@ module Test puts [Marshal.dump($!)].pack('m')#, "assertions=\#{self._assertions}" exit } + def pend(msg = nil) $stdout.syswrite [Marshal.dump(msg.to_s)].pack("m"); exit! 0 end #{src} class Test::Unit::Runner @@stop_auto_run = true @@ -389,7 +390,9 @@ eom rescue => marshal_error ignore_stderr = nil end - if res + if res.is_a?(String) + pend res + elsif res if bt = res.backtrace bt.each do |l| l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"} |