aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/fs_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua/fs_spec.lua')
-rw-r--r--test/functional/lua/fs_spec.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/lua/fs_spec.lua b/test/functional/lua/fs_spec.lua
index f646e676c6..aae0ed91a7 100644
--- a/test/functional/lua/fs_spec.lua
+++ b/test/functional/lua/fs_spec.lua
@@ -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') ]])