aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-28 18:11:51 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-28 18:34:01 -0500
commitd712c30fff8cbe1328b12fc48d4572766db6c805 (patch)
tree06df9f6a687dd6fdcf37ec010ecd82f213685835 /src
parent26dfeb42dd515ebd0a0f1f1da3aadc11fb993041 (diff)
downloadrneovim-d712c30fff8cbe1328b12fc48d4572766db6c805.tar.gz
rneovim-d712c30fff8cbe1328b12fc48d4572766db6c805.tar.bz2
rneovim-d712c30fff8cbe1328b12fc48d4572766db6c805.zip
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. https://github.com/vim/vim/commit/c5a8fdc42dbd304598b2d73db754c7b97665b182
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/check.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim
index 467ff5a1e9..24d3959f83 100644
--- a/src/nvim/testdir/check.vim
+++ b/src/nvim/testdir/check.vim
@@ -12,6 +12,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