Mercurial > vim
diff src/testdir/test_vim9_builtin.vim @ 25640:78ef12e0ce8c v8.2.3356
patch 8.2.3356: adding many text properties requires a lot of function calls
Commit: https://github.com/vim/vim/commit/ccfb7c6758510e0fe5f390149ea14aee6ff4f55e
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon Aug 16 21:39:09 2021 +0200
patch 8.2.3356: adding many text properties requires a lot of function calls
Problem: Adding many text properties requires a lot of function calls.
Solution: Add the prop_add_list() function. (Yegappan Lakshmanan,
closes #8751)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 16 Aug 2021 21:45:03 +0200 |
parents | 951f3e04e238 |
children | ef38fc02faaa |
line wrap: on
line diff
--- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -2364,6 +2364,11 @@ def Test_prop_add() CheckDefAndScriptFailure2(['prop_add(1, 2, [])'], 'E1013: Argument 3: type mismatch, expected dict<any> but got list<unknown>', 'E1206: Dictionary required for argument 3') enddef +def Test_prop_add_list() + CheckDefAndScriptFailure2(['prop_add_list([], [])'], 'E1013: Argument 1: type mismatch, expected dict<any> but got list<unknown>', 'E1206: Dictionary required for argument 1') + CheckDefAndScriptFailure2(['prop_add_list({}, {})'], 'E1013: Argument 2: type mismatch, expected list<any> but got dict<unknown>', 'E1211: List required for argument 2') +enddef + def Test_prop_clear() CheckDefAndScriptFailure2(['prop_clear("a")'], 'E1013: Argument 1: type mismatch, expected number but got string', 'E1210: Number required for argument 1') CheckDefAndScriptFailure2(['prop_clear(1, "b")'], 'E1013: Argument 2: type mismatch, expected number but got string', 'E1210: Number required for argument 2')