aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/check.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-18 20:49:42 -0400
committerGitHub <noreply@github.com>2021-03-18 20:49:42 -0400
commit0f7b6b2efd4270545f2080ae91ad241189e00d67 (patch)
tree1ce94fb5770691bf7ba384cc3bbd092ee521a4fc /src/nvim/testdir/check.vim
parentb5926f7f27d6d87e2c5115b9b39c3f009c6ea5ca (diff)
parentbd2ea22a54b875ce66595e10fd9354ad31276801 (diff)
downloadrneovim-0f7b6b2efd4270545f2080ae91ad241189e00d67.tar.gz
rneovim-0f7b6b2efd4270545f2080ae91ad241189e00d67.tar.bz2
rneovim-0f7b6b2efd4270545f2080ae91ad241189e00d67.zip
Merge pull request #14155 from janlazo/vim-8.2.2609
vim-patch:8.2.{2609,2611}
Diffstat (limited to 'src/nvim/testdir/check.vim')
-rw-r--r--src/nvim/testdir/check.vim27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim
index 24d3959f83..7b06e53dd5 100644
--- a/src/nvim/testdir/check.vim
+++ b/src/nvim/testdir/check.vim
@@ -108,3 +108,30 @@ func CheckNotMSWindows()
throw 'Skipped: does not work on MS-Windows'
endif
endfunc
+
+" Command to check for satisfying any of the conditions.
+" e.g. CheckAnyOf Feature:bsd Feature:sun Linux
+command -nargs=+ CheckAnyOf call CheckAnyOf(<f-args>)
+func CheckAnyOf(...)
+ let excp = []
+ for arg in a:000
+ try
+ exe 'Check' .. substitute(arg, ':', ' ', '')
+ return
+ catch /^Skipped:/
+ let excp += [substitute(v:exception, '^Skipped:\s*', '', '')]
+ endtry
+ endfor
+ throw 'Skipped: ' .. join(excp, '; ')
+endfunc
+
+" Command to check for satisfying all of the conditions.
+" e.g. CheckAllOf Unix Gui Option:ballooneval
+command -nargs=+ CheckAllOf call CheckAllOf(<f-args>)
+func CheckAllOf(...)
+ for arg in a:000
+ exe 'Check' .. substitute(arg, ':', ' ', '')
+ endfor
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab