feat(test): add Lua forms for API methods (#20152)

This commit is contained in:
Lewis Russell
2022-11-14 10:01:35 +00:00
committed by GitHub
parent 5c5187c6f8
commit e8cc489acc
14 changed files with 160 additions and 105 deletions

View File

@@ -246,9 +246,9 @@ describe('mapset()', function()
end)
it('does not leak memory if lhs is missing', function()
eq('Error executing lua: Vim:E460: entries missing in mapset() dict argument',
eq('Vim:E460: entries missing in mapset() dict argument',
pcall_err(exec_lua, [[vim.fn.mapset('n', false, {rhs = 'foo'})]]))
eq('Error executing lua: Vim:E460: entries missing in mapset() dict argument',
eq('Vim:E460: entries missing in mapset() dict argument',
pcall_err(exec_lua, [[vim.fn.mapset('n', false, {callback = function() end})]]))
end)
end)