mirror of
https://github.com/neovim/neovim.git
synced 2026-03-06 17:17:21 +00:00
feat(fs): expose join_paths as vim.fs.joinpath (#23685)
This is a small function but used a lot in some plugins.
This commit is contained in:
@@ -266,6 +266,17 @@ describe('vim.fs', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('joinpath()', function()
|
||||
it('works', function()
|
||||
eq('foo/bar/baz', exec_lua([[
|
||||
return vim.fs.joinpath('foo', 'bar', 'baz')
|
||||
]], nvim_dir))
|
||||
eq('foo/bar/baz', exec_lua([[
|
||||
return vim.fs.joinpath('foo', '/bar/', '/baz')
|
||||
]], nvim_dir))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('normalize()', function()
|
||||
it('works with backward slashes', function()
|
||||
eq('C:/Users/jdoe', exec_lua [[ return vim.fs.normalize('C:\\Users\\jdoe') ]])
|
||||
|
||||
Reference in New Issue
Block a user