mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
20eebb8542
commit
7eb7f063a4
1 changed files with 10 additions and 2 deletions
|
@ -23,8 +23,16 @@ module DL
|
||||||
|
|
||||||
def test_static_sym
|
def test_static_sym
|
||||||
skip "DL::Handle.sym is not supported" if /mswin|mingw/ =~ RUBY_PLATFORM
|
skip "DL::Handle.sym is not supported" if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||||
assert_not_nil DL::Handle.sym('dlopen')
|
begin
|
||||||
assert_equal DL::Handle.sym('dlopen'), DL::Handle['dlopen']
|
# 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
|
end
|
||||||
|
|
||||||
def test_sym_closed_handle
|
def test_sym_closed_handle
|
||||||
|
|
Loading…
Reference in a new issue