aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-16 08:55:42 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-16 10:15:15 +0800
commit08121ef69f47f8ad8f8903a732920412e24d30c1 (patch)
tree82b56291fc2e45d3d668fb4f125312912d7c0df6 /test
parentd13222649a2145272f14675d9bbf64bb72c43f64 (diff)
downloadrneovim-08121ef69f47f8ad8f8903a732920412e24d30c1.tar.gz
rneovim-08121ef69f47f8ad8f8903a732920412e24d30c1.tar.bz2
rneovim-08121ef69f47f8ad8f8903a732920412e24d30c1.zip
vim-patch:8.2.2848: crash whn calling partial
Problem: Crash whn calling partial. Solution: Check for NULL pointer. (Dominique Pellé, closes vim/vim#8202) https://github.com/vim/vim/commit/fe8ebdbe5c4e116311c0c0d5937b89ded5c92d01 Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_functions.vim6
-rw-r--r--test/old/testdir/test_listdict.vim2
2 files changed, 8 insertions, 0 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index ad2b6dc563..3144af83d7 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -2009,6 +2009,12 @@ func Test_call()
eval mydict.len->call([], mydict)->assert_equal(4)
call assert_fails("call call('Mylen', [], 0)", 'E715:')
call assert_fails('call foo', 'E107:')
+
+ " This 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(), [])
endfunc
func Test_char2nr()
diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim
index 41ea04c755..cbed71bb0a 100644
--- a/test/old/testdir/test_listdict.vim
+++ b/test/old/testdir/test_listdict.vim
@@ -751,6 +751,8 @@ func Test_reduce()
" should not crash
" Nvim doesn't have null functions
" call assert_fails('echo reduce([1], test_null_function())', 'E1132:')
+ " Nvim doesn't have null partials
+ " call assert_fails('echo reduce([1], test_null_partial())', 'E1132:')
endfunc
" splitting a string to a List using split()