mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
test: remove internal assertions and simplify
This commit is contained in:
parent
b621921074
commit
ab561302a3
@ -90,16 +90,13 @@ describe('vim.loader', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('correct indent on error message (#29809)', function()
|
it('correct indent on error message (#29809)', function()
|
||||||
exec_lua [[
|
local errmsg = exec_lua [[
|
||||||
vim.loader.enable()
|
vim.loader.enable()
|
||||||
|
local _, errmsg = pcall(require, 'non_existent_module')
|
||||||
local success, errmsg = pcall(require, 'non_existent_module')
|
return errmsg
|
||||||
assert(not success)
|
|
||||||
|
|
||||||
errmsg = errmsg:gsub("^module 'non_existent_module' not found:\n", '')
|
|
||||||
for line in vim.gsplit(errmsg, '\n') do
|
|
||||||
assert(line:find('^\t'), ('not indented: %q'):format(line))
|
|
||||||
end
|
|
||||||
]]
|
]]
|
||||||
|
local errors = vim.split(errmsg, '\n')
|
||||||
|
eq("\tcache_loader: module 'non_existent_module' not found", errors[3])
|
||||||
|
eq("\tcache_loader_lib: module 'non_existent_module' not found", errors[4])
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user