aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/cmd_map_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-03 07:30:12 +0800
committerGitHub <noreply@github.com>2022-05-03 07:30:12 +0800
commitcf474021ed44f197da3c67214fcb95a20886799c (patch)
treebff933e965afcb939aaacdad6b44f00eae9a25cf /test/functional/ex_cmds/cmd_map_spec.lua
parentddf7bb24f98b468d2bc6c16c6f300570fc6530f5 (diff)
parent15602a7ce49a2f39666aa6a4f3289683835e83dd (diff)
downloadrneovim-cf474021ed44f197da3c67214fcb95a20886799c.tar.gz
rneovim-cf474021ed44f197da3c67214fcb95a20886799c.tar.bz2
rneovim-cf474021ed44f197da3c67214fcb95a20886799c.zip
Merge pull request #18381 from zeertzjq/vim-8.2.4858
vim-patch:8.2.4858: K_SPECIAL may be escaped twice
Diffstat (limited to 'test/functional/ex_cmds/cmd_map_spec.lua')
-rw-r--r--test/functional/ex_cmds/cmd_map_spec.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/functional/ex_cmds/cmd_map_spec.lua b/test/functional/ex_cmds/cmd_map_spec.lua
index 42e97757db..919d167712 100644
--- a/test/functional/ex_cmds/cmd_map_spec.lua
+++ b/test/functional/ex_cmds/cmd_map_spec.lua
@@ -136,10 +136,17 @@ describe('mappings with <Cmd>', function()
]])
end)
- it('handles character containing K_SPECIAL (0x80) byte correctly', function()
- command([[noremap <F3> <Cmd>let g:str = '‥'<CR>]])
+ it('handles string containing K_SPECIAL (0x80) bytes correctly', function()
+ command([[noremap <F3> <Cmd>let g:str = 'foo…bar'<CR>]])
feed('<F3>')
- eq('‥', eval('g:str'))
+ eq('foo…bar', eval('g:str'))
+ local str = eval([["foo\<D-…>bar"]])
+ command([[noremap <F3> <Cmd>let g:str = ']]..str..[['<CR>]])
+ feed('<F3>')
+ eq(str, eval('g:str'))
+ command([[noremap <F3> <Cmd>let g:str = 'foo<D-…>bar'<CR>]])
+ feed('<F3>')
+ eq(str, eval('g:str'))
end)
it('works in various modes and sees correct `mode()` value', function()