diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2022-06-24 21:32:38 +1200 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2022-06-24 21:37:58 +1200 |
commit | c95b8f3664299ff60fa06073ab0ad77f4d5ed3d0 (patch) | |
tree | 0c095e49d48b85bd923f22d4760202f314b1cb48 /spec/ffi/ffi_spec.rb | |
parent | 269e8f939e497bba749ff54ee4d79197e5c06ead (diff) | |
download | ffi-c95b8f3664299ff60fa06073ab0ad77f4d5ed3d0.tar.gz |
Add support for passing ABI version to `FFI.map_library_name`.
Diffstat (limited to 'spec/ffi/ffi_spec.rb')
-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 |