patch 8.2.0188: Check commands don't work well with Vim9 script
Problem: Check commands don't work well with Vim9 script.
Solution: Improve constant expression handling.
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index 30c4158..6efa348 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