1
0
forked from aniani/vim

patch 8.2.2881: 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 #8245)
This commit is contained in:
Yegappan Lakshmanan
2021-05-24 15:15:47 +02:00
committed by Bram Moolenaar
parent ad5c178a19
commit 611728f806
8 changed files with 49 additions and 2 deletions

View File

@@ -1843,6 +1843,10 @@ func Test_func_exists_on_reload()
call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 'Xfuncexists2')
call assert_fails('source Xfuncexists2', 'E122:')
" Defining a new function from the cmdline should fail if the function is
" already defined
call assert_fails('call feedkeys(":func ExistingFunction()\<CR>", "xt")', 'E122:')
delfunc ExistingFunction
call assert_equal(0, exists('*ExistingFunction'))
call writefile([