diff src/testdir/test_mapping.vim @ 28800:fea88e555652 v8.2.4924

patch 8.2.4924: maparg() may return a string that cannot be reused Commit: https://github.com/vim/vim/commit/0519ce00394474055bd58c089ea90a19986443eb Author: zeertzjq <zeertzjq@outlook.com> Date: Mon May 9 12:16:19 2022 +0100 patch 8.2.4924: maparg() may return a string that cannot be reused Problem: maparg() may return a string that cannot be reused. Solution: use msg_outtrans_special() instead of str2special(). (closes #10384)
author Bram Moolenaar <Bram@vim.org>
date Mon, 09 May 2022 13:30:03 +0200
parents 141fb1d233ba
children ae39554ad2ee
line wrap: on
line diff
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -502,6 +502,13 @@ func Test_list_mappings()
   call assert_equal(['n  <M-…>         foo'],
         \ execute('nmap <M-…>')->trim()->split("\n"))
 
+  " illegal bytes
+  let str = ":\x7f:\x80:\x90:\xd0:"
+  exe 'nmap foo ' .. str
+  call assert_equal(['n  foo           ' .. strtrans(str)],
+        \ execute('nmap foo')->trim()->split("\n"))
+  unlet str
+
   " map to CTRL-V
   exe "nmap ,k \<C-V>"
   call assert_equal(['n  ,k            <Nop>'],