1
0
forked from aniani/vim

patch 8.2.0459: cannot check if a function name is correct

Problem:    Cannot check if a function name is correct.
Solution:   Add "?funcname" to exists().
This commit is contained in:
Bram Moolenaar
2020-03-26 22:16:48 +01:00
parent bea9023d42
commit 15c476023f
5 changed files with 307 additions and 213 deletions

View File

@@ -92,6 +92,11 @@ func Test_exists()
" Function that may be created by script autoloading
call assert_equal(0, exists('*footest#F'))
call assert_equal(has('float'), exists('*acos'))
call assert_equal(1, exists('?acos'))
call assert_equal(has('win32'), exists('*debugbreak'))
call assert_equal(1, exists('?debugbreak'))
" Valid internal command (full match)
call assert_equal(2, exists(':edit'))
" Valid internal command (full match) with garbage