summaryrefslogtreecommitdiff
path: root/test/dl/test_handle.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/dl/test_handle.rb')
-rw-r--r--test/dl/test_handle.rb13
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