summaryrefslogtreecommitdiff
path: root/src/testdir/check.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-22 16:17:14 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-22 16:17:14 +0100
commit7929651e05b081fe55e0e745725a7ad78c51be16 (patch)
tree547fffcb659d850bf483beb98ea214259f337adc /src/testdir/check.vim
parent9b9be007e7d674f49fc2b650f840d08532b180ad (diff)
downloadvim-git-7929651e05b081fe55e0e745725a7ad78c51be16.tar.gz
patch 8.2.0427: it is not possible to check for a typo in a feature namev8.2.0427
Problem: It is not possible to check for a typo in a feature name. Solution: Add an extra argument to has().
Diffstat (limited to 'src/testdir/check.vim')
-rw-r--r--src/testdir/check.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index 687610195..0bbe7caf9 100644
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -6,6 +6,9 @@ command -nargs=1 MissingFeature throw 'Skipped: ' .. <args> .. ' feature missing
" Command to check for the presence of a feature.
command -nargs=1 CheckFeature call CheckFeature(<f-args>)
func CheckFeature(name)
+ if !has(a:name, 1)
+ throw 'Checking for non-existent feature ' .. a:name
+ endif
if !has(a:name)
MissingFeature a:name
endif