diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-10-03 14:31:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 14:31:53 +0200 |
commit | 3beea1fe1bca5b0cf3f724ab0d06a01a04652297 (patch) | |
tree | d4049608bcde6e4ff18bcc9aa300832063a1930d /test/functional/api/keymap_spec.lua | |
parent | 9fe704f88e455f886c8854604b2869c72b28e510 (diff) | |
parent | 32565922efe0d1a6e8e4dddb23295d1a08670b54 (diff) | |
download | rneovim-3beea1fe1bca5b0cf3f724ab0d06a01a04652297.tar.gz rneovim-3beea1fe1bca5b0cf3f724ab0d06a01a04652297.tar.bz2 rneovim-3beea1fe1bca5b0cf3f724ab0d06a01a04652297.zip |
Merge pull request #15516 from bfredl/keyset
refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
Diffstat (limited to 'test/functional/api/keymap_spec.lua')
-rw-r--r-- | test/functional/api/keymap_spec.lua | 12 |
1 files changed, 6 insertions, 6 deletions
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 |