mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test: add more tests for K_SPECIAL escaping in <Cmd> mapping
This commit is contained in:
parent
27149e0071
commit
15602a7ce4
@ -136,10 +136,17 @@ describe('mappings with <Cmd>', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('handles character containing K_SPECIAL (0x80) byte correctly', function()
|
it('handles string containing K_SPECIAL (0x80) bytes correctly', function()
|
||||||
command([[noremap <F3> <Cmd>let g:str = '‥'<CR>]])
|
command([[noremap <F3> <Cmd>let g:str = 'foo…bar'<CR>]])
|
||||||
feed('<F3>')
|
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)
|
end)
|
||||||
|
|
||||||
it('works in various modes and sees correct `mode()` value', function()
|
it('works in various modes and sees correct `mode()` value', function()
|
||||||
|
Loading…
Reference in New Issue
Block a user