summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-24 21:56:50 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-24 21:56:50 +0000
commit886c186d02c12b7a934bd1033d1c96f0accc93a8 (patch)
treecf9df8d4723c48093e139bc4f002b260ea358c8a /test
parenta5d3cd4c5cd43a36e2f2232aa1c5e49136696ec1 (diff)
downloadruby-886c186d02c12b7a934bd1033d1c96f0accc93a8.tar.gz
ruby-886c186d02c12b7a934bd1033d1c96f0accc93a8.tar.xz
ruby-886c186d02c12b7a934bd1033d1c96f0accc93a8.zip
* ext/dl/handle.c (rb_dlhandle_close) check return value of dlclose()
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 d46e16c08..fed9da4f8 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