mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
docs(api): nvim_get_runtime_file preserves 'runtimepath' order #30454
This commit is contained in:
committed by
GitHub
parent
e697c1b43d
commit
29bceb4f75
@@ -3307,6 +3307,16 @@ describe('API', function()
|
||||
exc_exec("echo nvim_get_runtime_file('{', v:false)")
|
||||
)
|
||||
end)
|
||||
it('preserves order of runtimepath', function()
|
||||
local vimruntime = fn.getenv('VIMRUNTIME')
|
||||
local rtp = string.format('%s/syntax,%s/ftplugin', vimruntime, vimruntime)
|
||||
api.nvim_set_option_value('runtimepath', rtp, {})
|
||||
|
||||
local val = api.nvim_get_runtime_file('vim.vim', true)
|
||||
eq(2, #val)
|
||||
eq(p(val[1]), vimruntime .. '/syntax/vim.vim')
|
||||
eq(p(val[2]), vimruntime .. '/ftplugin/vim.vim')
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('nvim_get_all_options_info', function()
|
||||
|
||||
Reference in New Issue
Block a user