diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-17 22:03:42 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-17 22:11:58 -0400 |
| commit | 2ae6705f871568682df9bbee840c740698a917fd (patch) | |
| tree | e8517c5fec08868a1db6cdfb197667da7b16613f /src/nvim/testdir/check.vim | |
| parent | f1f131d132e983bead9173c5cb75a66447c82902 (diff) | |
| download | rneovim-2ae6705f871568682df9bbee840c740698a917fd.tar.gz rneovim-2ae6705f871568682df9bbee840c740698a917fd.tar.bz2 rneovim-2ae6705f871568682df9bbee840c740698a917fd.zip | |
vim-patch:8.2.2611: conditions for startup tests are not exactly right
Problem: Conditions for startup tests are not exactly right.
Solution: Check for type of GUI instead of MS-Windows. (Ozaki Kiichi,
closes vim/vim#7976)
https://github.com/vim/vim/commit/f8c52e8d08de3fdf48db877d7d53d2d68c6ceb7b
Diffstat (limited to 'src/nvim/testdir/check.vim')
| -rw-r--r-- | src/nvim/testdir/check.vim | 27 |
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 |