diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-22 20:13:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-22 20:13:39 +0100 |
commit | c5a8fdc42dbd304598b2d73db754c7b97665b182 (patch) | |
tree | aa5695fd3aca36ad2feca1a096cdc91c5991697b /src/testdir/check.vim | |
parent | d5bc32df207eae408263ae6ab737771365d0bca1 (diff) |
patch 8.2.0429: no warning when test checks for option that never existsv8.2.0429
Problem: No warning when test checks for option that never exists.
Solution: In tests check that the option can exist.
Diffstat (limited to 'src/testdir/check.vim')
-rw-r--r-- | src/testdir/check.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testdir/check.vim b/src/testdir/check.vim index 0bbe7caf94..d01dd81dd5 100644 --- 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 |