1
0
forked from aniani/vim

patch 8.2.0429: no warning when test checks for option that never exists

Problem:    No warning when test checks for option that never exists.
Solution:   In tests check that the option can exist.
This commit is contained in:
Bram Moolenaar
2020-03-22 20:13:39 +01:00
parent d5bc32df20
commit c5a8fdc42d
2 changed files with 5 additions and 0 deletions

View File

@@ -17,6 +17,9 @@ endfunc
" Command to check for the presence of a working option.
command -nargs=1 CheckOption call CheckOption(<f-args>)
func CheckOption(name)
if !exists('&' .. a:name)
throw 'Checking for non-existent option ' .. a:name
endif
if !exists('+' .. a:name)
throw 'Skipped: ' .. a:name .. ' option not supported'
endif

View File

@@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
429,
/**/
428,
/**/