aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_user_func.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_user_func.vim')
-rw-r--r--src/nvim/testdir/test_user_func.vim10
1 files changed, 10 insertions, 0 deletions
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)