Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
24684:1706f44ede8e | 24685:04205b7d67d5 |
---|---|
1841 | 1841 |
1842 " But redefining in another script is not OK. | 1842 " But redefining in another script is not OK. |
1843 call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 'Xfuncexists2') | 1843 call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 'Xfuncexists2') |
1844 call assert_fails('source Xfuncexists2', 'E122:') | 1844 call assert_fails('source Xfuncexists2', 'E122:') |
1845 | 1845 |
1846 " Defining a new function from the cmdline should fail if the function is | |
1847 " already defined | |
1848 call assert_fails('call feedkeys(":func ExistingFunction()\<CR>", "xt")', 'E122:') | |
1849 | |
1846 delfunc ExistingFunction | 1850 delfunc ExistingFunction |
1847 call assert_equal(0, exists('*ExistingFunction')) | 1851 call assert_equal(0, exists('*ExistingFunction')) |
1848 call writefile([ | 1852 call writefile([ |
1849 \ 'func ExistingFunction()', 'echo "yes"', 'endfunc', | 1853 \ 'func ExistingFunction()', 'echo "yes"', 'endfunc', |
1850 \ 'func ExistingFunction()', 'echo "no"', 'endfunc', | 1854 \ 'func ExistingFunction()', 'echo "no"', 'endfunc', |