diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-22 16:17:14 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-22 16:17:14 +0100 |
commit | 7929651e05b081fe55e0e745725a7ad78c51be16 (patch) | |
tree | 547fffcb659d850bf483beb98ea214259f337adc /src/testdir/check.vim | |
parent | 9b9be007e7d674f49fc2b650f840d08532b180ad (diff) | |
download | vim-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.vim | 3 |
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 |