From 0d6e1273d6e39c1102d5ee77e778a1d2d42a4fa0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 25 Nov 2022 10:38:30 +0800 Subject: vim-patch:8.2.2886: various pieces of code not covered by tests Problem: Various pieces of code not covered by tests. Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8255) https://github.com/vim/vim/commit/34fcb697240c1bc9e69417ed75db3b1a83479724 Nvim does not have test_unknown(). Co-authored-by: Yegappan Lakshmanan --- src/nvim/testdir/test_user_func.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/nvim/testdir/test_user_func.vim') diff --git a/src/nvim/testdir/test_user_func.vim b/src/nvim/testdir/test_user_func.vim index f13c082814..4742293ed5 100644 --- a/src/nvim/testdir/test_user_func.vim +++ b/src/nvim/testdir/test_user_func.vim @@ -163,6 +163,16 @@ func Test_default_arg() \ .. "1 return deepcopy(a:)\n" \ .. " endfunction", \ execute('func Args2')) + + " Error in default argument expression + let l =<< trim END + func F1(x = y) + return a:x * 2 + endfunc + echo F1() + END + let @a = l->join("\n") + call assert_fails("exe @a", 'E121:') endfunc func s:addFoo(lead) -- cgit