Skip to content

Commit 01b28d5

Browse files
committed
Add a test for disabled rpath
1 parent aec09e2 commit 01b28d5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/rcd_test/test/test_basic.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,13 @@ def test_largefile_op_removed_from_musl
3535
is_linux = RUBY_PLATFORM.include?("linux")
3636
assert_equal(is_linux, RcdTest.largefile_op_removed_from_musl)
3737
end
38+
39+
def test_disabled_rpath
40+
cext_fname = $LOADED_FEATURES.grep(/rcd_test_ext/).first
41+
refute_nil(cext_fname, "the C-ext should be loaded")
42+
cext_text = File.binread(cext_fname)
43+
assert_match(/Init_rcd_test_ext/, cext_text, "C-ext shoud contain the init function")
44+
refute_match(/usr\/local/, cext_text, "there should be no rpath to /usr/local/rake-compiler/ruby/x86_64-unknown-linux-musl/ruby-3.4.5/lib or so")
45+
refute_match(/home\//, cext_text, "there should be no path to /home/ or so")
46+
end
3847
end

0 commit comments

Comments
 (0)