aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/api')
-rw-r--r--test/functional/api/highlight_spec.lua4
-rw-r--r--test/functional/api/keymap_spec.lua2
-rw-r--r--test/functional/api/vim_spec.lua4
3 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua
index daf20c006c..058706718a 100644
--- a/test/functional/api/highlight_spec.lua
+++ b/test/functional/api/highlight_spec.lua
@@ -57,7 +57,7 @@ describe('API: highlight',function()
-- Test nil argument.
err, emsg = pcall(meths.get_hl_by_id, { nil }, false)
eq(false, err)
- eq('Wrong type for argument 1, expecting Integer',
+ eq('Wrong type for argument 1 when calling nvim_get_hl_by_id, expecting Integer',
string.match(emsg, 'Wrong.*'))
-- Test 0 argument.
@@ -112,7 +112,7 @@ describe('API: highlight',function()
-- Test nil argument.
err, emsg = pcall(meths.get_hl_by_name , { nil }, false)
eq(false, err)
- eq('Wrong type for argument 1, expecting String',
+ eq('Wrong type for argument 1 when calling nvim_get_hl_by_name, expecting String',
string.match(emsg, 'Wrong.*'))
-- Test empty string argument.
diff --git a/test/functional/api/keymap_spec.lua b/test/functional/api/keymap_spec.lua
index 5da2c6b531..d8a9c3b411 100644
--- a/test/functional/api/keymap_spec.lua
+++ b/test/functional/api/keymap_spec.lua
@@ -751,7 +751,7 @@ describe('nvim_buf_set_keymap, nvim_buf_del_keymap', function()
end
it('rejects negative bufnr values', function()
- eq('Wrong type for argument 1, expecting Buffer',
+ eq('Wrong type for argument 1 when calling nvim_buf_set_keymap, expecting Buffer',
pcall_err(bufmeths.set_keymap, -1, '', 'lhs', 'rhs', {}))
end)
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 0b52d06df9..7948f7da09 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -1350,7 +1350,7 @@ describe('API', function()
eq({info=info}, meths.get_var("info_event"))
eq({[1]=testinfo,[2]=stderr,[3]=info}, meths.list_chans())
- eq("Vim:Error invoking 'nvim_set_current_buf' on channel 3 (amazing-cat):\nWrong type for argument 1, expecting Buffer",
+ eq("Vim:Error invoking 'nvim_set_current_buf' on channel 3 (amazing-cat):\nWrong type for argument 1 when calling nvim_set_current_buf, expecting Buffer",
pcall_err(eval, 'rpcrequest(3, "nvim_set_current_buf", -1)'))
end)
@@ -1512,7 +1512,7 @@ describe('API', function()
it("does not leak memory on incorrect argument types", function()
local status, err = pcall(nvim, 'set_current_dir',{'not', 'a', 'dir'})
eq(false, status)
- ok(err:match(': Wrong type for argument 1, expecting String') ~= nil)
+ ok(err:match(': Wrong type for argument 1 when calling nvim_set_current_dir, expecting String') ~= nil)
end)
describe('nvim_parse_expression', function()