зеркало из https://github.com/github/ruby.git
* bootstraptest/runner.rb (assert_normal_exit): new method.
* bootstraptest/test_knownbug.rb: add test for Marshal.load. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2d6ad7e118
Коммит
d537ca1f84
|
@ -1,3 +1,9 @@
|
|||
Sat Sep 29 12:28:08 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bootstraptest/runner.rb (assert_normal_exit): new method.
|
||||
|
||||
* bootstraptest/test_knownbug.rb: add test for Marshal.load.
|
||||
|
||||
Sat Sep 29 10:12:20 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* variable.c (rb_ivar_set): fix class instance variable.
|
||||
|
|
|
@ -166,6 +166,32 @@ def assert_match(expected_pattern, testsrc, message = '')
|
|||
}
|
||||
end
|
||||
|
||||
def assert_normal_exit(testsrc, message = '')
|
||||
newtest
|
||||
$stderr.puts "\##{@count} #{@location}" if @verbose
|
||||
faildesc = nil
|
||||
filename = make_srcfile(testsrc)
|
||||
system("#{@ruby} -W0 #{filename}")
|
||||
if $?.signaled?
|
||||
signo = $?.termsig
|
||||
signame = Signal.list.invert[signo]
|
||||
sigdesc = "signal #{signo}"
|
||||
if signame
|
||||
sigdesc = "SIG#{signame} (#{sigdesc})"
|
||||
end
|
||||
faildesc = pretty(testsrc, "killed by #{sigdesc}", nil)
|
||||
end
|
||||
if !faildesc
|
||||
$stderr.print '.'
|
||||
else
|
||||
$stderr.print 'F'
|
||||
error faildesc, message
|
||||
end
|
||||
rescue Exception => err
|
||||
$stderr.print 'E'
|
||||
error err.message, message
|
||||
end
|
||||
|
||||
def assert_finish(timeout_seconds, testsrc, message = '')
|
||||
newtest
|
||||
$stderr.puts "\##{@count} #{@location}" if @verbose
|
||||
|
|
|
@ -28,3 +28,7 @@ assert_equal 'ok', %q{
|
|||
:ok
|
||||
end
|
||||
}
|
||||
|
||||
assert_normal_exit %q{
|
||||
Marshal.load("\004\b\173\006\"\006k\"\006v", lambda {|v| })
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче