From d712c30fff8cbe1328b12fc48d4572766db6c805 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 28 Dec 2020 18:11:51 -0500 Subject: 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 --- src/nvim/testdir/check.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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() 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 -- cgit