summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorSatoshi Tagomori <s-tagomori@sakura.ad.jp>2025-12-02 22:22:01 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-12-09 23:41:50 +0900
commit07e85e1dba3e15c714044660f731a90ce86c8c24 (patch)
treed00de23e0bac77a77fccdd82432fd34e57211d35 /test/ruby
parent573896a40ac25bd9febb2bbc0502b43ef36f9b9b (diff)
Box: add a test case about deleting .so/.dll files
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_box.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_box.rb b/test/ruby/test_box.rb
index 2e4e07a86a..1daf5d57d5 100644
--- a/test/ruby/test_box.rb
+++ b/test/ruby/test_box.rb
@@ -823,4 +823,17 @@ class TestBox < Test::Unit::TestCase
assert_equal 42, b.eval('1+2')
end;
end
+
+ def test_loaded_extension_deleted_in_user_box
+ require 'tmpdir'
+ Dir.mktmpdir do |tmpdir|
+ env = ENV_ENABLE_BOX.merge({'TMPDIR'=>tmpdir})
+ assert_separately([env], __FILE__, __LINE__, "#{<<~"begin;"}\n#{<<~'end;'}", ignore_stderr: true)
+ begin;
+ require "json"
+ tmpdirname = ENV['TMPDIR']
+ assert_empty(Dir.children(tmpdirname))
+ end;
+ end
+ end
end