mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
skip unless PLATFORM is darwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5ba15ec86f
commit
ed740754bd
1 changed files with 5 additions and 4 deletions
|
@ -2,19 +2,20 @@
|
|||
require 'test/unit'
|
||||
|
||||
class TestVMDump < Test::Unit::TestCase
|
||||
def assert_vm_dump_works(args)
|
||||
def assert_darwin_vm_dump_works(args)
|
||||
skip if RUBY_PLATFORM !~ /darwin/
|
||||
assert_in_out_err(args, "", [], [:*, /^.* main \+ \d+$/, :*, /^\[IMPORTANT\]/, :*])
|
||||
end
|
||||
|
||||
def test_darwin_invalid_call
|
||||
assert_vm_dump_works(['-rfiddle', '-eFiddle::Function.new(Fiddle::Pointer.new(1), [], Fiddle::TYPE_VOID).call'])
|
||||
assert_darwin_vm_dump_works(['-rfiddle', '-eFiddle::Function.new(Fiddle::Pointer.new(1), [], Fiddle::TYPE_VOID).call'])
|
||||
end
|
||||
|
||||
def test_darwin_segv_in_syscall
|
||||
assert_vm_dump_works('-e1.times{Process.kill :SEGV,$$}')
|
||||
assert_darwin_vm_dump_works('-e1.times{Process.kill :SEGV,$$}')
|
||||
end
|
||||
|
||||
def test_darwin_invalid_access
|
||||
assert_vm_dump_works(['-rfiddle', '-eFiddle.dlunwrap(100).class'])
|
||||
assert_darwin_vm_dump_works(['-rfiddle', '-eFiddle.dlunwrap(100).class'])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue