diff options
Diffstat (limited to 'test/functional/api')
-rw-r--r-- | test/functional/api/command_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/api/keymap_spec.lua | 12 | ||||
-rw-r--r-- | test/functional/api/vim_spec.lua | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/api/command_spec.lua b/test/functional/api/command_spec.lua index 37331d11c7..6f929ad1ca 100644 --- a/test/functional/api/command_spec.lua +++ b/test/functional/api/command_spec.lua @@ -21,7 +21,7 @@ describe('nvim_get_commands', function() it('validates input', function() eq('builtin=true not implemented', pcall_err(meths.get_commands, {builtin=true})) - eq('unexpected key: foo', pcall_err(meths.get_commands, + eq("Invalid key: 'foo'", pcall_err(meths.get_commands, {foo='blah'})) end) diff --git a/test/functional/api/keymap_spec.lua b/test/functional/api/keymap_spec.lua index 4194945645..dd8eef7ca0 100644 --- a/test/functional/api/keymap_spec.lua +++ b/test/functional/api/keymap_spec.lua @@ -436,16 +436,16 @@ describe('nvim_set_keymap, nvim_del_keymap', function() end) it('error on invalid optnames', function() - eq('Invalid key: silentt', + eq("Invalid key: 'silentt'", pcall_err(meths.set_keymap, 'n', 'lhs', 'rhs', {silentt = true})) - eq('Invalid key: sidd', + eq("Invalid key: 'sidd'", pcall_err(meths.set_keymap, 'n', 'lhs', 'rhs', {sidd = false})) - eq('Invalid key: nowaiT', + eq("Invalid key: 'nowaiT'", pcall_err(meths.set_keymap, 'n', 'lhs', 'rhs', {nowaiT = false})) end) it('error on <buffer> option key', function() - eq('Invalid key: buffer', + eq("Invalid key: 'buffer'", pcall_err(meths.set_keymap, 'n', 'lhs', 'rhs', {buffer = true})) end) @@ -454,8 +454,8 @@ describe('nvim_set_keymap, nvim_del_keymap', function() -- note: need '%' to escape hyphens, which have special meaning in lua it('throws an error when given non-boolean value for '..opt, function() local opts = {} - opts[opt] = 2 - eq('Gave non-boolean value for an opt: '..opt, + opts[opt] = 'fooo' + eq(opt..' is not a boolean', pcall_err(meths.set_keymap, 'n', 'lhs', 'rhs', opts)) end) end diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index df602ed48c..6bcf8dd91f 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -1119,7 +1119,7 @@ describe('API', function() describe('nvim_get_context', function() it('validates args', function() - eq('unexpected key: blah', + eq("Invalid key: 'blah'", pcall_err(nvim, 'get_context', {blah={}})) eq('invalid value for key: types', pcall_err(nvim, 'get_context', {types=42})) |