aboutsummaryrefslogtreecommitdiff
path: root/test/functional/editor/langmap_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-26 15:31:29 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-29 15:51:04 +0800
commitd531ef6813919dd6df8ca6927cd99ec3c0a65635 (patch)
tree96d62d121e5744fd7504ff007e6ea025561e83f7 /test/functional/editor/langmap_spec.lua
parentabe91e1efec84c47c03a69ab8a998bb16f628084 (diff)
downloadrneovim-d531ef6813919dd6df8ca6927cd99ec3c0a65635.tar.gz
rneovim-d531ef6813919dd6df8ca6927cd99ec3c0a65635.tar.bz2
rneovim-d531ef6813919dd6df8ca6927cd99ec3c0a65635.zip
vim-patch:8.2.0867: using \{xxx} for encoding a modifier is not nice
Problem: Using \{xxx} for encoding a modifier is not nice. Solution: Use \<*xxx> instead, since it's the same as \<xxx> but producing a different code. https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f Use this notation in langmap_spec.
Diffstat (limited to 'test/functional/editor/langmap_spec.lua')
-rw-r--r--test/functional/editor/langmap_spec.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/editor/langmap_spec.lua b/test/functional/editor/langmap_spec.lua
index af19f97a68..b1070ecddc 100644
--- a/test/functional/editor/langmap_spec.lua
+++ b/test/functional/editor/langmap_spec.lua
@@ -213,11 +213,11 @@ describe("'langmap'", function()
iii]])
end)
- local function testrecording(command_string, expect_string, setup_function)
+ local function testrecording(command_string, expect_string, setup_function, expect_macro)
if setup_function then setup_function() end
feed('qa' .. command_string .. 'q')
expect(expect_string)
- eq(helpers.funcs.nvim_replace_termcodes(command_string, true, true, true),
+ eq(expect_macro or helpers.funcs.nvim_replace_termcodes(command_string, true, true, true),
eval('@a'))
if setup_function then setup_function() end
-- n.b. may need nvim_replace_termcodes() here.
@@ -273,8 +273,8 @@ describe("'langmap'", function()
it('treats control modified keys as characters', function()
command('nnoremap <C-w> iw<esc>')
command('nnoremap <C-i> ii<esc>')
- testrecording('<C-w>', 'whello', local_setup)
- testrecording('<C-i>', 'ihello', local_setup)
+ testrecording('<C-w>', 'whello', local_setup, eval([["\<*C-w>"]]))
+ testrecording('<C-i>', 'ihello', local_setup, eval([["\<*C-i>"]]))
end)
end)