summaryrefslogtreecommitdiffstats
path: root/src/testdir/check.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-31 22:12:41 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-31 22:12:41 +0100
commit7f829cab356d63b8e59559285593777a66bcc02b (patch)
tree76c437516a8d0bec5c395cf7c517ce9e76574cc8 /src/testdir/check.vim
parent0b76ad53b30232093b96a74d5ce6f02395219456 (diff)
patch 8.2.0188: Check commands don't work well with Vim9 scriptv8.2.0188
Problem: Check commands don't work well with Vim9 script. Solution: Improve constant expression handling.
Diffstat (limited to 'src/testdir/check.vim')
-rw-r--r--src/testdir/check.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index 30c415821f..6efa348e5a 100644
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -1,10 +1,12 @@
source shared.vim
+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)
- throw 'Skipped: ' .. a:name .. ' feature missing'
+ MissingFeature a:name
endif
endfunc