]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1405: tests: no test for mapping with special keys in session file v9.1.1405
authorzeertzjq <zeertzjq@outlook.com>
Fri, 23 May 2025 15:16:17 +0000 (17:16 +0200)
committerChristian Brabandt <cb@256bit.org>
Fri, 23 May 2025 15:16:17 +0000 (17:16 +0200)
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>
src/testdir/test_mksession.vim
src/testdir/test_mksession_utf8.vim
src/version.c

index 72a9376c3ef75ef62a2fe30f7cf829aef2b89cf0..bbb42f94ce335bd6242a26707f42d67fa42dfd3c 100644 (file)
@@ -1153,10 +1153,10 @@ endfunc
 func Test_mkvimrc()
   let entries = [
         \ ['', 'nothing', '<Nop>'],
-        \ ['n', 'normal', 'NORMAL'],
-        \ ['v', 'visual', 'VISUAL'],
-        \ ['s', 'select', 'SELECT'],
-        \ ['x', 'visualonly', 'VISUALONLY'],
+        \ ['n', 'normal', 'NORMAL<Up>'],
+        \ ['v', 'visual', 'VISUAL<S-Down>'],
+        \ ['s', 'select', 'SELECT<C-Left>'],
+        \ ['x', 'visualonly', 'VISUALONLY<M-Right>'],
         \ ['o', 'operator', 'OPERATOR'],
         \ ['i', 'insert', 'INSERT'],
         \ ['l', 'lang', 'LANG'],
index 36cb38bea7cb9bb2e2d38809a317bce0d71c4491..387d128f6e5e9332be759b37719bb4b3b8ce567e 100644 (file)
@@ -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', '<M-ç>', '<M-ç>'],
         \ ['n', '<M-º>', '<M-º>'],
         \ ['n', '<M-¡>', '<M-¡>'],
+        \ ['n', '…', 'ě'],
+        \ ['n', 'ě', '…'],
+        \ ['n', '<M-…>', '<M-ě>'],
+        \ ['n', '<M-ě>', '<M-…>'],
         \ ]
   for entry in entries
     exe entry[0] .. 'map ' .. entry[1] .. ' ' .. entry[2]
index 9cecc0be8be5bab833867160b62606d548603ffd..c45c65e7b7c26d54bdce0217313e249d77209721 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1405,
 /**/
     1404,
 /**/