From ff83c712cf99d4691efc3cc316d5b854548fc93b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 24 May 2025 06:38:12 +0800 Subject: [PATCH] vim-patch:9.1.1405: tests: no test for mapping with special keys in session file (#34146) 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: vim/vim#17360 https://github.com/vim/vim/commit/9ff1e598e8ee373b5623219ed38ad49470ec7938 (cherry picked from commit 071dcab68f8159f15efad6b9f95196e74d708f0f) --- test/old/testdir/test_mksession.vim | 8 ++++---- test/old/testdir/test_mksession_utf8.vim | 11 +++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/test/old/testdir/test_mksession.vim b/test/old/testdir/test_mksession.vim index 8c9b3f1c22..7eaa59f827 100644 --- a/test/old/testdir/test_mksession.vim +++ b/test/old/testdir/test_mksession.vim @@ -1086,10 +1086,10 @@ endfunc func Test_mkvimrc() let entries = [ \ ['', 'nothing', ''], - \ ['n', 'normal', 'NORMAL'], - \ ['v', 'visual', 'VISUAL'], - \ ['s', 'select', 'SELECT'], - \ ['x', 'visualonly', 'VISUALONLY'], + \ ['n', 'normal', 'NORMAL'], + \ ['v', 'visual', 'VISUAL'], + \ ['s', 'select', 'SELECT'], + \ ['x', 'visualonly', 'VISUALONLY'], \ ['o', 'operator', 'OPERATOR'], \ ['i', 'insert', 'INSERT'], \ ['l', 'lang', 'LANG'], diff --git a/test/old/testdir/test_mksession_utf8.vim b/test/old/testdir/test_mksession_utf8.vim index 36cb38bea7..387d128f6e 100644 --- a/test/old/testdir/test_mksession_utf8.vim +++ b/test/old/testdir/test_mksession_utf8.vim @@ -103,12 +103,19 @@ func Test_mksession_utf8() endfunc 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 = [ + \ ['n', 'ç', 'ç'], + \ ['n', 'º', 'º'], + \ ['n', '¡', '¡'], \ ['n', '', ''], \ ['n', '', ''], \ ['n', '', ''], + \ ['n', '…', 'ě'], + \ ['n', 'ě', '…'], + \ ['n', '', ''], + \ ['n', '', ''], \ ] for entry in entries exe entry[0] .. 'map ' .. entry[1] .. ' ' .. entry[2]