diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-05 14:10:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-05 14:10:04 +0200 |
commit | d6fa7bd5b900dd363d3a824e0ebe3619a1634df6 (patch) | |
tree | 53b137d9baeaa83162ac19dcd98a86cabbed4894 | |
parent | 22f85d04594e1a09936227ef62955a7939d584b4 (diff) | |
download | vim-git-d6fa7bd5b900dd363d3a824e0ebe3619a1634df6.tar.gz |
patch 8.2.3108: test for remote_foreground() failsv8.2.3108
Problem: Test for remote_foreground() fails. (Elimar Riesebieter)
Solution: Check that $DISPLAY is set. (Christian Brabandt)
-rw-r--r-- | src/testdir/check.vim | 8 | ||||
-rw-r--r-- | src/testdir/test_clientserver.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 13 insertions, 3 deletions
diff --git a/src/testdir/check.vim b/src/testdir/check.vim index d6bfe004a..504a1928e 100644 --- a/src/testdir/check.vim +++ b/src/testdir/check.vim @@ -136,6 +136,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/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim index 2704fb668..a088e178f 100644 --- a/src/testdir/test_clientserver.vim +++ b/src/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 diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index 38bd8271c..f6b5a099b 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -1415,6 +1415,8 @@ def Test_remote_foreground() CheckFeature clientserver # remote_foreground() doesn't fail on MS-Windows CheckNotMSWindows + CheckEnv DISPLAY + CheckDefFailure(['remote_foreground(10)'], 'E1013: Argument 1: type mismatch, expected string but got number') assert_fails('remote_foreground("NonExistingServer")', 'E241:') enddef diff --git a/src/version.c b/src/version.c index 060c2e770..9b1ac9aa5 100644 --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3108, +/**/ 3107, /**/ 3106, |