mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
feat(lua): document support of packages with v:lua syntax
this already worked in 0.5 but was not properly documented or tested
This commit is contained in:
@ -527,6 +527,12 @@ describe('v:lua', function()
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('supports packages', function()
|
||||
command('set pp+=test/functional/fixtures')
|
||||
eq('\tbadval', eval("v:lua.require'leftpad'('badval')"))
|
||||
eq(9003, eval("v:lua.require'bar'.doit()"))
|
||||
end)
|
||||
|
||||
it('throw errors for invalid use', function()
|
||||
eq('Vim(let):E15: Invalid expression: v:lua.func', pcall_err(command, "let g:Func = v:lua.func"))
|
||||
eq('Vim(let):E15: Invalid expression: v:lua', pcall_err(command, "let g:Func = v:lua"))
|
||||
|
Reference in New Issue
Block a user