aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/check.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-07-04 11:00:48 -0400
committerGitHub <noreply@github.com>2021-07-04 11:00:48 -0400
commit18bfcfe77f007f146a7251aa3cc6129891390c30 (patch)
tree741849ac08038690779f833bb33d204ba4978eee /src/nvim/testdir/check.vim
parent490615612ed5ec587c8023de28db495b3181de30 (diff)
parent0d75b0d8d470fdf763743823feb6d9013eff069c (diff)
downloadrneovim-18bfcfe77f007f146a7251aa3cc6129891390c30.tar.gz
rneovim-18bfcfe77f007f146a7251aa3cc6129891390c30.tar.bz2
rneovim-18bfcfe77f007f146a7251aa3cc6129891390c30.zip
Merge pull request #14981 from janlazo/vim-8.2.3081
vim-patch:8.2.{3081,3082,3085,3087,3088,3093,3094,3097,3098}
Diffstat (limited to 'src/nvim/testdir/check.vim')
-rw-r--r--src/nvim/testdir/check.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim
index 7b06e53dd5..14bab33a2f 100644
--- a/src/nvim/testdir/check.vim
+++ b/src/nvim/testdir/check.vim
@@ -9,6 +9,17 @@ func CheckFeature(name)
endif
endfunc
+" Command to check for the absence of a feature.
+command -nargs=1 CheckNotFeature call CheckNotFeature(<f-args>)
+func CheckNotFeature(name)
+ if !has(a:name, 1)
+ throw 'Checking for non-existent feature ' .. a:name
+ endif
+ if has(a:name)
+ throw 'Skipped: ' .. a:name .. ' feature present'
+ endif
+endfunc
+
" Command to check for the presence of a working option.
command -nargs=1 CheckOption call CheckOption(<f-args>)
func CheckOption(name)