diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-05 09:50:27 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-05 09:50:54 +0800 |
commit | adcf7a221984d61fc472c12875930783bef4e97a (patch) | |
tree | 6f265d7073081491d002264537a13c329fce4bd9 | |
parent | 060789e3350a99a41c503d76766ddfaac0c5e93a (diff) | |
download | rneovim-adcf7a221984d61fc472c12875930783bef4e97a.tar.gz rneovim-adcf7a221984d61fc472c12875930783bef4e97a.tar.bz2 rneovim-adcf7a221984d61fc472c12875930783bef4e97a.zip |
vim-patch:8.2.3108: test for remote_foreground() fails
Problem: Test for remote_foreground() fails. (Elimar Riesebieter)
Solution: Check that $DISPLAY is set. (Christian Brabandt)
https://github.com/vim/vim/commit/d6fa7bd5b900dd363d3a824e0ebe3619a1634df6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | src/nvim/testdir/check.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_clientserver.vim | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index 61d3a99a67..0fba0e107b 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('$' .. 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() diff --git a/src/nvim/testdir/test_clientserver.vim b/src/nvim/testdir/test_clientserver.vim index d135e3a194..c54996a545 100644 --- a/src/nvim/testdir/test_clientserver.vim +++ b/src/nvim/testdir/test_clientserver.vim @@ -13,9 +13,7 @@ source shared.vim func Check_X11_Connection() if has('x11') - if empty($DISPLAY) - throw 'Skipped: $DISPLAY is not set' - endif + CheckEnv DISPLAY try call remote_send('xxx', '') catch |