Skip to content

Commit

Permalink
Update lua test
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmturner committed Dec 30, 2024
1 parent 89feb31 commit cf67370
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/search_index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ struct RfcSearchResults* search_terms(const char* terms);
]])

local current_dir = lfs.currentdir();

local dylib = current_dir .. "/target/debug/libffi.so"
print("Lib path: ", dylib)
local lib_extension = (jit.os == "OSX") and ".dylib" or ".so"
local dylib = current_dir .. "/artifacts/libffi" .. lib_extension
local lib = ffi.load(dylib)

local results = lib.search_terms("Hello")
Expand All @@ -33,8 +32,3 @@ for i = 0, results.len - 1 do
local title = ffi.string(rfc.title):gsub("\n", " ")
print("Title: ", title)
end


-- if results == nil or results.error ~= 0 then
-- error("Error searching: ", results.error)
-- end

0 comments on commit cf67370

Please sign in to comment.