diff src/testdir/test_functions.vim @ 20526:9fd5414e294c v8.2.0817

patch 8.2.0817: not enough memory allocated when converting string Commit: https://github.com/vim/vim/commit/f7271e831614d15d173c7f562cc26f48c2554ce9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 24 18:45:07 2020 +0200 patch 8.2.0817: not enough memory allocated when converting string Problem: Not enough memory allocated when converting string with special character. Solution: Reserve space for modifier code. (closes #6130)
author Bram Moolenaar <Bram@vim.org>
date Sun, 24 May 2020 19:00:03 +0200
parents 244eb8d8d100
children 193c0446cf28
line wrap: on
line diff
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -2278,6 +2278,8 @@ func Test_nr2char()
   set encoding=utf8
   call assert_equal('a', nr2char(97, 1))
   call assert_equal('a', nr2char(97, 0))
+
+  call assert_equal("\x80\xfc\b\xf4\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x100000) .. '>"'))
 endfunc
 
 " Test for screenattr(), screenchar() and screenchars() functions