diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-09-09 04:00:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 04:00:35 -0700 |
commit | f0334c2c711ab6d2cd123f7506497c1311b0b926 (patch) | |
tree | 96a58f869698b9e80662f0793fdcc72a32293d64 /test/functional/api | |
parent | 8a2aec99748229ad9d1e12c1cbc0768d063e8eed (diff) | |
parent | c8e3618e0e68485c92bba3790a06d472d9b62697 (diff) | |
download | rneovim-f0334c2c711ab6d2cd123f7506497c1311b0b926.tar.gz rneovim-f0334c2c711ab6d2cd123f7506497c1311b0b926.tar.bz2 rneovim-f0334c2c711ab6d2cd123f7506497c1311b0b926.zip |
Merge #30312 from justinmk/testslashes
Diffstat (limited to 'test/functional/api')
-rw-r--r-- | test/functional/api/vim_spec.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 074d3ac0a3..71703c9b05 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -3201,7 +3201,7 @@ describe('API', function() end) describe('nvim_get_runtime_file', function() - local p = n.alter_slashes + local p = t.fix_slashes it('can find files', function() eq({}, api.nvim_get_runtime_file('bork.borkbork', false)) eq({}, api.nvim_get_runtime_file('bork.borkbork', true)) @@ -3210,36 +3210,36 @@ describe('API', function() local val = api.nvim_get_runtime_file('autoload/remote/*.vim', true) eq(2, #val) if endswith(val[1], 'define.vim') then - ok(endswith(val[1], p 'autoload/remote/define.vim')) - ok(endswith(val[2], p 'autoload/remote/host.vim')) + ok(endswith(p(val[1]), 'autoload/remote/define.vim')) + ok(endswith(p(val[2]), 'autoload/remote/host.vim')) else - ok(endswith(val[1], p 'autoload/remote/host.vim')) - ok(endswith(val[2], p 'autoload/remote/define.vim')) + ok(endswith(p(val[1]), 'autoload/remote/host.vim')) + ok(endswith(p(val[2]), 'autoload/remote/define.vim')) end val = api.nvim_get_runtime_file('autoload/remote/*.vim', false) eq(1, #val) ok( - endswith(val[1], p 'autoload/remote/define.vim') - or endswith(val[1], p 'autoload/remote/host.vim') + endswith(p(val[1]), 'autoload/remote/define.vim') + or endswith(p(val[1]), 'autoload/remote/host.vim') ) val = api.nvim_get_runtime_file('lua', true) eq(1, #val) - ok(endswith(val[1], p 'lua')) + ok(endswith(p(val[1]), 'lua')) val = api.nvim_get_runtime_file('lua/vim', true) eq(1, #val) - ok(endswith(val[1], p 'lua/vim')) + ok(endswith(p(val[1]), 'lua/vim')) end) it('can find directories', function() local val = api.nvim_get_runtime_file('lua/', true) eq(1, #val) - ok(endswith(val[1], p 'lua/')) + ok(endswith(p(val[1]), 'lua/')) val = api.nvim_get_runtime_file('lua/vim/', true) eq(1, #val) - ok(endswith(val[1], p 'lua/vim/')) + ok(endswith(p(val[1]), 'lua/vim/')) eq({}, api.nvim_get_runtime_file('foobarlang/', true)) end) |