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.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb
index a8dcf1952b..487b8d1a34 100644
--- a/test/dl/test_handle.rb
+++ b/test/dl/test_handle.rb
@@ -105,5 +105,22 @@ module DL
handle = DL::Handle.new(LIBC_SO, DL::RTLD_LAZY | DL::RTLD_GLOBAL)
assert handle['calloc']
end
+
+ def test_enable_close
+ handle = DL::Handle.new(LIBC_SO)
+ assert !handle.close_enabled?, 'close is enabled'
+
+ handle.enable_close
+ assert handle.close_enabled?, 'close is not enabled'
+ end
+
+ def test_disable_close
+ handle = DL::Handle.new(LIBC_SO)
+
+ handle.enable_close
+ assert handle.close_enabled?, 'close is enabled'
+ handle.disable_close
+ assert !handle.close_enabled?, 'close is enabled'
+ end
end
end