Mercurial > vim
diff src/testdir/test_functions.vim @ 24685:04205b7d67d5 v8.2.2881
patch 8.2.2881: various pieces of code not covered by tests
Commit: https://github.com/vim/vim/commit/611728f80604dd56960e8c197e5749d203c8feb1
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon May 24 15:15:47 2021 +0200
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 https://github.com/vim/vim/issues/8245)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 24 May 2021 15:30:03 +0200 |
parents | 53fd6370e4fd |
children | 13efbfc53054 |
line wrap: on
line diff
--- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -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([