patch 9.1.1405: tests: no test for mapping with special keys in session file

Problem:  tests: no test for mapping with special keys in session file.
Solution: Add a special keys to an existing test.  Also test with UTF-8
          characters containing 0x80 or 0x9b bytes (zeertzjq).

closes: #17360

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2025-05-23 17:16:17 +02:00
committed by Christian Brabandt
parent e8302da74a
commit 9ff1e598e8
3 changed files with 15 additions and 6 deletions

View File

@ -1153,10 +1153,10 @@ endfunc
func Test_mkvimrc() func Test_mkvimrc()
let entries = [ let entries = [
\ ['', 'nothing', '<Nop>'], \ ['', 'nothing', '<Nop>'],
\ ['n', 'normal', 'NORMAL'], \ ['n', 'normal', 'NORMAL<Up>'],
\ ['v', 'visual', 'VISUAL'], \ ['v', 'visual', 'VISUAL<S-Down>'],
\ ['s', 'select', 'SELECT'], \ ['s', 'select', 'SELECT<C-Left>'],
\ ['x', 'visualonly', 'VISUALONLY'], \ ['x', 'visualonly', 'VISUALONLY<M-Right>'],
\ ['o', 'operator', 'OPERATOR'], \ ['o', 'operator', 'OPERATOR'],
\ ['i', 'insert', 'INSERT'], \ ['i', 'insert', 'INSERT'],
\ ['l', 'lang', 'LANG'], \ ['l', 'lang', 'LANG'],

View File

@ -103,12 +103,19 @@ func Test_mksession_utf8()
endfunc endfunc
func Test_session_multibyte_mappings() func Test_session_multibyte_mappings()
" some characters readily available on european keyboards,
" some characters readily available on european keyboards " as well as characters containing 0x80 or 0x9b bytes
let entries = [ let entries = [
\ ['n', 'ç', 'ç'],
\ ['n', 'º', 'º'],
\ ['n', '¡', '¡'],
\ ['n', '<M-ç>', '<M-ç>'], \ ['n', '<M-ç>', '<M-ç>'],
\ ['n', '<M-º>', '<M-º>'], \ ['n', '<M-º>', '<M-º>'],
\ ['n', '<M-¡>', '<M-¡>'], \ ['n', '<M-¡>', '<M-¡>'],
\ ['n', '…', 'ě'],
\ ['n', 'ě', '…'],
\ ['n', '<M-…>', '<M-ě>'],
\ ['n', '<M-ě>', '<M-…>'],
\ ] \ ]
for entry in entries for entry in entries
exe entry[0] .. 'map ' .. entry[1] .. ' ' .. entry[2] exe entry[0] .. 'map ' .. entry[1] .. ' ' .. entry[2]

View File

@ -709,6 +709,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1405,
/**/ /**/
1404, 1404,
/**/ /**/