changeset 19746:1da2fb80b512 v8.2.0429

patch 8.2.0429: no warning when test checks for option that never exists Commit: https://github.com/vim/vim/commit/c5a8fdc42dbd304598b2d73db754c7b97665b182 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 22 20:13:39 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Mar 2020 20:15:04 +0100
parents 7a9b0a54964b
children 1f4dc8bc8b24
files src/testdir/check.vim src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -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
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    429,
+/**/
     428,
 /**/
     427,