aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/keymap_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/api/keymap_spec.lua')
-rw-r--r--test/functional/api/keymap_spec.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/functional/api/keymap_spec.lua b/test/functional/api/keymap_spec.lua
index 995711507f..73dae0dd60 100644
--- a/test/functional/api/keymap_spec.lua
+++ b/test/functional/api/keymap_spec.lua
@@ -803,11 +803,17 @@ describe('nvim_set_keymap, nvim_del_keymap', function()
it('throws appropriate error messages when setting <unique> maps', function()
api.nvim_set_keymap('l', 'lhs', 'rhs', {})
eq(
- 'E227: mapping already exists for lhs',
+ 'E227: Mapping already exists for lhs',
pcall_err(api.nvim_set_keymap, 'l', 'lhs', 'rhs', { unique = true })
)
-- different mapmode, no error should be thrown
api.nvim_set_keymap('t', 'lhs', 'rhs', { unique = true })
+
+ api.nvim_set_keymap('n', '<tab>', 'rhs', {})
+ eq(
+ 'E227: Mapping already exists for <tab>',
+ pcall_err(api.nvim_set_keymap, 'n', '<tab>', 'rhs', { unique = true })
+ )
end)
it('can set <expr> mappings whose RHS change dynamically', function()