summaryrefslogtreecommitdiff
path: root/spec/ffi
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2023-05-08 13:25:45 +0200
committerGitHub <noreply@github.com>2023-05-08 13:25:45 +0200
commit73c36d77d76ef681cade4c4024abfe73af8a38b6 (patch)
tree1aa0e209aaaec9668be5d040627b9529a419c6df /spec/ffi
parentc6b7139d0394638ef51b451b81dcd2ffefb94160 (diff)
parentc95b8f3664299ff60fa06073ab0ad77f4d5ed3d0 (diff)
downloadffi-73c36d77d76ef681cade4c4024abfe73af8a38b6.tar.gz
Merge pull request #963 from ioquatix/library-pathHEADmaster
Add support for passing ABI version to `FFI.map_library_name`.
Diffstat (limited to 'spec/ffi')
-rw-r--r--spec/ffi/ffi_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ffi/ffi_spec.rb b/spec/ffi/ffi_spec.rb
index 4de5310..608cd99 100644
--- a/spec/ffi/ffi_spec.rb
+++ b/spec/ffi/ffi_spec.rb
@@ -24,6 +24,15 @@ describe "FFI" do
expect(FFI.map_library_name('c')).to eq(FFI::Library::LIBC)
end
+ it "should return library path with abi version" do
+ expect(FFI.map_library_name(FFI::LibraryPath.new('vips', 42))).to be =~ /#{prefix}vips.*42/
+ end
+
+ it "should return library path with root" do
+ root = "/non/existant/root"
+
+ expect(FFI.map_library_name(FFI::LibraryPath.new('vips', 42, root))).to be =~ /#{root}/#{prefix}vips.*42/
+ end
end
describe "VERSION" do