diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-12-05 10:22:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-05 10:22:47 +0800 |
| commit | 1c6f7e5933fcc4b58e7cb3a945d7654b6e591e4a (patch) | |
| tree | 02fdc53f0d65f92775914890a55cf16c4bea4c01 /src/nvim/testdir/check.vim | |
| parent | b098e7971fdf8ed3f7d0c52aff0ce126c34ff3c8 (diff) | |
| parent | 9ae6b03e7aaf635da5d39c1bd7ff6829cc232acb (diff) | |
| download | rneovim-1c6f7e5933fcc4b58e7cb3a945d7654b6e591e4a.tar.gz rneovim-1c6f7e5933fcc4b58e7cb3a945d7654b6e591e4a.tar.bz2 rneovim-1c6f7e5933fcc4b58e7cb3a945d7654b6e591e4a.zip | |
Merge pull request #21292 from zeertzjq/vim-8.2.1195
vim-patch:8.2.{1195,1197,2240,3108,3109,3495,3499,3526,5145}
Diffstat (limited to 'src/nvim/testdir/check.vim')
| -rw-r--r-- | src/nvim/testdir/check.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index 61d3a99a67..a188f7afa1 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -123,6 +123,14 @@ func CheckCanRunGui() endif endfunc +" Command to Check for an environment variable +command -nargs=1 CheckEnv call CheckEnv(<f-args>) +func CheckEnv(name) + if empty(eval('$' .. a:name)) + throw 'Skipped: Environment variable ' .. a:name .. ' is not set' + endif +endfunc + " Command to check that we are using the GUI command CheckGui call CheckGui() func CheckGui() @@ -163,6 +171,22 @@ func CheckNotAsan() endif endfunc +" Command to check for not running under valgrind +command CheckNotValgrind call CheckNotValgrind() +func CheckNotValgrind() + if RunningWithValgrind() + throw 'Skipped: does not work well with valgrind' + endif +endfunc + +" Command to check for X11 based GUI +command CheckX11BasedGui call CheckX11BasedGui() +func CheckX11BasedGui() + if !g:x11_based_gui + throw 'Skipped: requires X11 based GUI' + 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>) |