mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
5e9508c702
commit
1b3c255f60
@ -74,7 +74,7 @@ end
|
||||
|
||||
---@private
|
||||
local function join_paths(...)
|
||||
return table.concat({ ... }, '/')
|
||||
return (table.concat({ ... }, '/'):gsub('//+', '/'))
|
||||
end
|
||||
|
||||
--- Return an iterator over the files and directories located in {path}
|
||||
|
@ -230,6 +230,11 @@ describe('vim.fs', function()
|
||||
local dir, nvim = ...
|
||||
return vim.fs.find(nvim, { path = dir, type = 'file' })
|
||||
]], test_build_dir, nvim_prog_basename))
|
||||
eq({nvim_dir}, exec_lua([[
|
||||
local dir = ...
|
||||
local parent, name = dir:match('^(.*/)([^/]+)$')
|
||||
return vim.fs.find(name, { path = parent, upward = true, type = 'directory' })
|
||||
]], nvim_dir))
|
||||
end)
|
||||
|
||||
it('accepts predicate as names', function()
|
||||
|
Loading…
Reference in New Issue
Block a user