diff options
author | Lars Kanis <lars@greiz-reinsdorf.de> | 2023-05-08 13:25:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 13:25:45 +0200 |
commit | 73c36d77d76ef681cade4c4024abfe73af8a38b6 (patch) | |
tree | 1aa0e209aaaec9668be5d040627b9529a419c6df /spec/ffi | |
parent | c6b7139d0394638ef51b451b81dcd2ffefb94160 (diff) | |
parent | c95b8f3664299ff60fa06073ab0ad77f4d5ed3d0 (diff) | |
download | ffi-73c36d77d76ef681cade4c4024abfe73af8a38b6.tar.gz |
Add support for passing ABI version to `FFI.map_library_name`.
Diffstat (limited to 'spec/ffi')
-rw-r--r-- | spec/ffi/ffi_spec.rb | 9 |
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 |