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:
naruse 2010-05-19 10:15:38 +00:00
Родитель 20eebb8542
Коммит 7eb7f063a4
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -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