diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-27 13:55:35 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-27 13:55:35 +0000 |
commit | 745b938a48104778dcb7b0245e6589b54cb93593 (patch) | |
tree | de334bcfde5b7c3e4a7326db7528ea6cdabee3e6 /src/testdir/test_vim9_builtin.vim | |
parent | b0ad2d92fd19e673ddbbc66742bae3f71778efde (diff) | |
download | vim-git-745b938a48104778dcb7b0245e6589b54cb93593.tar.gz |
patch 8.2.4229: possible crash when invoking timer callback failsv8.2.4229
Problem: Possible crash when invoking timer callback fails.
Solution: Initialize the typval. Give an error for an empty callback.
(closes #9636)
Diffstat (limited to 'src/testdir/test_vim9_builtin.vim')
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index a00133f14..45d212cf0 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -4132,6 +4132,8 @@ enddef def Test_timer_start() CheckDefAndScriptFailure(['timer_start("a", "1")'], ['E1013: Argument 1: type mismatch, expected number but got string', 'E1210: Number required for argument 1']) CheckDefAndScriptFailure(['timer_start(1, "1", [1])'], ['E1013: Argument 3: type mismatch, expected dict<any> but got list<number>', 'E1206: Dictionary required for argument 3']) + CheckDefExecAndScriptFailure(['timer_start(100, 0)'], 'E921:') + CheckDefExecAndScriptFailure(['timer_start(100, "")'], 'E921:') enddef def Test_timer_stop() |