ivy.nvim/lua/ivy/libivy_test.lua

19 lines
484 B
Lua
Raw Normal View History

local libivy = require "ivy.libivy"
it("should run a simple match", function(t)
local score = libivy.ivy_match("term", "I am a serch term")
if score <= 0 then
t.error("Score should not be less than 0 found " .. score)
end
end)
2022-09-04 15:13:02 +00:00
it("should find a dot file", function(t)
local current_dir = libivy.ivy_cwd()
2022-09-04 15:13:02 +00:00
local matches = libivy.ivy_files("ci.yml", current_dir)
if matches ~= ".github/workflows/ci.yml\n" then
t.error("Invalid matches: " .. matches)
end
2022-09-04 15:13:02 +00:00
end)