comparison src/testdir/test_user_func.vim @ 24695:13efbfc53054 v8.2.2886

patch 8.2.2886: various pieces of code not covered by tests Commit: https://github.com/vim/vim/commit/34fcb697240c1bc9e69417ed75db3b1a83479724 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Tue May 25 20:14:00 2021 +0200 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 https://github.com/vim/vim/issues/8255)
author Bram Moolenaar <Bram@vim.org>
date Tue, 25 May 2021 20:15:03 +0200
parents 04205b7d67d5
children b916d59f259f
comparison
equal deleted inserted replaced
24694:44426ac4b715 24695:13efbfc53054
158 call assert_equal("\n" 158 call assert_equal("\n"
159 \ .. " function Args2(a = 1, b = 2, c = 3)\n" 159 \ .. " function Args2(a = 1, b = 2, c = 3)\n"
160 \ .. "1 return deepcopy(a:)\n" 160 \ .. "1 return deepcopy(a:)\n"
161 \ .. " endfunction", 161 \ .. " endfunction",
162 \ execute('func Args2')) 162 \ execute('func Args2'))
163
164 " Error in default argument expression
165 let l =<< trim END
166 func F1(x = y)
167 return a:x * 2
168 endfunc
169 echo F1()
170 END
171 let @a = l->join("\n")
172 call assert_fails("exe @a", 'E121:')
163 endfunc 173 endfunc
164 174
165 func s:addFoo(lead) 175 func s:addFoo(lead)
166 return a:lead .. 'foo' 176 return a:lead .. 'foo'
167 endfunc 177 endfunc