test: don't search entire repo for files

Searching the entire repo for a directory named "contrib" causes failure
if there happens to be another subdirectory with the name "contrib".
Instead, point directly to the correct contrib directory.
This commit is contained in:
dundargoc 2023-03-05 11:21:37 +01:00 committed by GitHub
parent 836733dad8
commit ba38f35d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,7 +260,7 @@ describe('vim.fs', function()
]], test_source_path),
exec_lua([[
local dir = ...
local opts = { path = dir, limit = math.huge }
local opts = { path = dir .. "/contrib", limit = math.huge }
return vim.tbl_map(vim.fs.basename, vim.fs.find(function(_, d) return d:match('[\\/]contrib$') end, opts))
]], test_source_path))
end)