diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-24 21:56:50 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-24 21:56:50 +0000 |
commit | a631b5df366f0e7b1c6f16b53281df3822b9e833 (patch) | |
tree | cf9df8d4723c48093e139bc4f002b260ea358c8a /test/dl/test_handle.rb | |
parent | c038e9003ce249d4f1346fef5b21883978a780ab (diff) |
* ext/dl/handle.c (rb_dlhandle_close) check return value of dlclose()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl/test_handle.rb')
-rw-r--r-- | test/dl/test_handle.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb index d46e16c084..fed9da4f85 100644 --- a/test/dl/test_handle.rb +++ b/test/dl/test_handle.rb @@ -2,6 +2,19 @@ require 'test_base' module DL class TestHandle < TestBase + def test_handle_close + handle = DL::Handle.new(LIBC_SO) + assert_equal 0, handle.close + end + + def test_handle_close_twice + handle = DL::Handle.new(LIBC_SO) + handle.close + assert_raises(DL::DLError) do + handle.close + end + end + def test_dlopen_returns_handle assert_instance_of DL::Handle, dlopen(LIBC_SO) end |