mirror of
https://github.com/neovim/neovim.git
synced 2026-03-30 04:12:01 +00:00
fix(api): use standard error messages
This commit is contained in:
@@ -44,7 +44,7 @@ describe('luaeval(vim.api.…)', function()
|
||||
|
||||
it('transforms API error from nvim_win_set_cursor into lua error', function()
|
||||
eq(
|
||||
{ false, 'Argument "pos" must be a [row, col] array' },
|
||||
{ false, "Invalid 'pos': expected [row, col] array" },
|
||||
fn.luaeval('{pcall(vim.api.nvim_win_set_cursor, 0, {1, 2, 3})}')
|
||||
)
|
||||
-- Used to produce a memory leak due to a bug in nvim_win_set_cursor
|
||||
@@ -58,7 +58,7 @@ describe('luaeval(vim.api.…)', function()
|
||||
'transforms API error from nvim_win_set_cursor + same array as in first test into lua error',
|
||||
function()
|
||||
eq(
|
||||
{ false, 'Argument "pos" must be a [row, col] array' },
|
||||
{ false, "Invalid 'pos': expected [row, col] array" },
|
||||
fn.luaeval('{pcall(vim.api.nvim_win_set_cursor, 0, {"b\\na"})}')
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user