mirror of
https://github.com/neovim/neovim.git
synced 2026-03-24 17:40:59 +00:00
runtime: propagate lua parsing errors while using "require"
This commit is contained in:
@@ -1453,3 +1453,18 @@ describe('lua stdlib', function()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('lua: require("mod") from packages', function()
|
||||
before_each(function()
|
||||
command('set rtp+=test/functional/fixtures')
|
||||
end)
|
||||
|
||||
it('propagates syntax error', function()
|
||||
local syntax_error_msg = exec_lua [[
|
||||
local _, err = pcall(require, "syntax_error")
|
||||
return err
|
||||
]]
|
||||
|
||||
matches("unexpected symbol", syntax_error_msg)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user