comparison src/testdir/test_functions.vim @ 20540:193c0446cf28 v8.2.0824

patch 8.2.0824: still not enough memory allocated when converting string Commit: https://github.com/vim/vim/commit/1919371b2b9ddb1a645f40b59adbd89317530882 Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 25 23:01:42 2020 +0200 patch 8.2.0824: still not enough memory allocated when converting string Problem: Still not enough memory allocated when converting string with special character. Solution: Reserve space for expanding K_SPECIAL. (closes #6130)
author Bram Moolenaar <Bram@vim.org>
date Mon, 25 May 2020 23:15:03 +0200
parents 9fd5414e294c
children 4411c2b96af9
comparison
equal deleted inserted replaced
20539:ca1354820ef2 20540:193c0446cf28
2278 set encoding=utf8 2278 set encoding=utf8
2279 call assert_equal('a', nr2char(97, 1)) 2279 call assert_equal('a', nr2char(97, 1))
2280 call assert_equal('a', nr2char(97, 0)) 2280 call assert_equal('a', nr2char(97, 0))
2281 2281
2282 call assert_equal("\x80\xfc\b\xf4\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x100000) .. '>"')) 2282 call assert_equal("\x80\xfc\b\xf4\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x100000) .. '>"'))
2283 call assert_equal("\x80\xfc\b\xfd\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x40000000) .. '>"'))
2283 endfunc 2284 endfunc
2284 2285
2285 " Test for screenattr(), screenchar() and screenchars() functions 2286 " Test for screenattr(), screenchar() and screenchars() functions
2286 func Test_screen_functions() 2287 func Test_screen_functions()
2287 call assert_equal(-1, screenattr(-1, -1)) 2288 call assert_equal(-1, screenattr(-1, -1))