summaryrefslogtreecommitdiffstats
path: root/src/testdir/check.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-17 12:27:23 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-17 12:27:23 +0100
commitf8c52e8d08de3fdf48db877d7d53d2d68c6ceb7b (patch)
treeff53ccb4df5f66c1cec656f191cf0e665784358d /src/testdir/check.vim
parent1e448465e1281eeb379f75fe848cbb47fe1be1d9 (diff)
patch 8.2.2611: conditions for startup tests are not exactly rightv8.2.2611
Problem: Conditions for startup tests are not exactly right. Solution: Check for type of GUI instead of MS-Windows. (Ozaki Kiichi, closes #7976)
Diffstat (limited to 'src/testdir/check.vim')
-rw-r--r--src/testdir/check.vim25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index db16cfb7d9..4fe130b7bf 100644
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -199,4 +199,29 @@ func CheckNotAsan()
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