Mercurial > vim
diff src/testdir/test_tagfunc.vim @ 26452:65b4109a4297 v8.2.3756
patch 8.2.3756: might crash when callback is not valid
Commit: https://github.com/vim/vim/commit/4dc24eb5adbcc76838fae1e900936dd230209d96
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Dec 7 12:23:57 2021 +0000
patch 8.2.3756: might crash when callback is not valid
Problem: might crash when callback is not valid.
Solution: Check for valid callback. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9293)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Dec 2021 13:30:05 +0100 |
parents | 65ab0b035dd8 |
children | 7eaf61a67d18 |
line wrap: on
line diff
--- a/src/testdir/test_tagfunc.vim +++ b/src/testdir/test_tagfunc.vim @@ -317,6 +317,11 @@ func Test_tagfunc_callback() call assert_fails("tag a17", "E117:") call assert_equal([], g:MytagFunc3_args) + " set 'tagfunc' to a non-existing function + call assert_fails("set tagfunc=function('NonExistingFunc')", 'E700:') + call assert_fails("let &tagfunc = function('NonExistingFunc')", 'E700:') + call assert_fails("tag axb123", 'E426:') + " cleanup delfunc MytagFunc1 delfunc MytagFunc2