patch 8.2.0427: it is not possible to check for a typo in a feature name
Problem: It is not possible to check for a typo in a feature name.
Solution: Add an extra argument to has().
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index 6876101..0bbe7ca 100644
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -6,6 +6,9 @@
" 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