diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-16 09:01:33 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-04-16 10:15:15 +0800 |
commit | f4d3e279e861dc37dd047c81a0807767a74d251b (patch) | |
tree | 96ebf30a32c73904ad4482e58dac2fb246cfb501 /test | |
parent | 08121ef69f47f8ad8f8903a732920412e24d30c1 (diff) | |
download | rneovim-f4d3e279e861dc37dd047c81a0807767a74d251b.tar.gz rneovim-f4d3e279e861dc37dd047c81a0807767a74d251b.tar.bz2 rneovim-f4d3e279e861dc37dd047c81a0807767a74d251b.zip |
vim-patch:8.2.2977: crash when using a null function reference
Problem: Crash when using a null function reference. (Naohiro Ono)
Solution: Check for an invalid function name. (closes vim/vim#8367)
https://github.com/vim/vim/commit/22db0d549f64aa3d8a6e366b70eb8d7e66933b82
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_functions.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index 3144af83d7..abea3b2538 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -2010,11 +2010,15 @@ func Test_call() call assert_fails("call call('Mylen', [], 0)", 'E715:') call assert_fails('call foo', 'E107:') - " This once caused a crash. + " These once caused a crash. " Nvim doesn't have null functions " call call(test_null_function(), []) " Nvim doesn't have null partials " call call(test_null_partial(), []) + " Nvim doesn't have null functions + " call assert_fails('call test_null_function()()', 'E1192:') + " Nvim doesn't have null partials + " call assert_fails('call test_null_partial()()', 'E117:') endfunc func Test_char2nr() |