зеркало из https://github.com/github/ruby.git
Fix test to follow the behavior of NetBSD's dlsym.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
20eebb8542
Коммит
7eb7f063a4
|
@ -23,8 +23,16 @@ module DL
|
|||
|
||||
def test_static_sym
|
||||
skip "DL::Handle.sym is not supported" if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
assert_not_nil DL::Handle.sym('dlopen')
|
||||
assert_equal DL::Handle.sym('dlopen'), DL::Handle['dlopen']
|
||||
begin
|
||||
# Linux / Darwin / FreeBSD
|
||||
assert_not_nil DL::Handle.sym('dlopen')
|
||||
assert_equal DL::Handle.sym('dlopen'), DL::Handle['dlopen']
|
||||
rescue
|
||||
# NetBSD
|
||||
require 'objspace'
|
||||
assert_not_nil DL::Handle.sym('Init_objspace')
|
||||
assert_equal DL::Handle.sym('Init_objspace'), DL::Handle['Init_objspace']
|
||||
end
|
||||
end
|
||||
|
||||
def test_sym_closed_handle
|
||||
|
|
Загрузка…
Ссылка в новой задаче