diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-05-20 17:30:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-20 17:30:48 +0200 |
commit | e3e6fadfd82861471c32fdcabe00bbef3de84563 (patch) | |
tree | e6c86d04a78e8a7b210181025d2dda4268669945 /test/functional/lua/fs_spec.lua | |
parent | 073035a030f5ef8ae9b9ca51552f887944c52eaa (diff) | |
download | rneovim-e3e6fadfd82861471c32fdcabe00bbef3de84563.tar.gz rneovim-e3e6fadfd82861471c32fdcabe00bbef3de84563.tar.bz2 rneovim-e3e6fadfd82861471c32fdcabe00bbef3de84563.zip |
feat(fs): expose join_paths as `vim.fs.joinpath` (#23685)
This is a small function but used a lot in some plugins.
Diffstat (limited to 'test/functional/lua/fs_spec.lua')
-rw-r--r-- | test/functional/lua/fs_spec.lua | 11 |
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') ]]) |