From 0efe1ec6b3a869cdfceb2ab98b230b52374a17ae Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 23 Jan 2022 05:58:32 +0800 Subject: test(input): add more tests for K_SPECIAL escaping in ins_char_typebuf() --- test/functional/editor/meta_key_spec.lua | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'test/functional') diff --git a/test/functional/editor/meta_key_spec.lua b/test/functional/editor/meta_key_spec.lua index 2280f5bb24..f811b8ae8d 100644 --- a/test/functional/editor/meta_key_spec.lua +++ b/test/functional/editor/meta_key_spec.lua @@ -27,6 +27,14 @@ describe('meta-keys #8226 #13042', function() command('nnoremap Aalt-j') feed('') expect('llo;;alt-jmeta-l') + -- Unmapped ALT-chord with characters containing K_SPECIAL bytes + command('nnoremap … A…') + feed('') + expect('llo;;alt-jmeta-l…') + command("execute 'nnoremap' nr2char(0x40000000) 'AMAX'") + command("call nvim_input('')") + command("call nvim_input('')") + expect('llo;;alt-jmeta-lMAXMAX') end) it('ALT/META, visual-mode', function() @@ -36,13 +44,20 @@ describe('meta-keys #8226 #13042', function() expect('peach') -- Unmapped ALT-chord resolves isolated (non-ALT) ESC mapping. #13086 #15869 command('vnoremap AESC>') - feed('viwviw') + feed('viwviw') expect('peach;;') -- Mapped ALT-chord behaves as mapped. command('vnoremap Ameta-l') command('vnoremap Aalt-j') feed('viwviw') expect('peach;;alt-jmeta-l') + -- Unmapped ALT-chord with characters containing K_SPECIAL bytes + feed('viwviw') + expect('peach;;alt-jmeta-l…') + command("execute 'inoremap' nr2char(0x40000000) 'MAX'") + command("call nvim_input('viw')") + command("call nvim_input('viw')") + expect('peach;;alt-jmeta-lMAXMAX') end) it('ALT/META insert-mode', function() -- cgit