forked from aniani/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)
This commit is contained in:
@@ -136,6 +136,14 @@ func CheckCanRunGui()
|
|||||||
endif
|
endif
|
||||||
endfunc
|
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 to check that we are using the GUI
|
||||||
command CheckGui call CheckGui()
|
command CheckGui call CheckGui()
|
||||||
func CheckGui()
|
func CheckGui()
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ source shared.vim
|
|||||||
|
|
||||||
func Check_X11_Connection()
|
func Check_X11_Connection()
|
||||||
if has('x11')
|
if has('x11')
|
||||||
if empty($DISPLAY)
|
CheckEnv DISPLAY
|
||||||
throw 'Skipped: $DISPLAY is not set'
|
|
||||||
endif
|
|
||||||
try
|
try
|
||||||
call remote_send('xxx', '')
|
call remote_send('xxx', '')
|
||||||
catch
|
catch
|
||||||
|
|||||||
@@ -1415,6 +1415,8 @@ def Test_remote_foreground()
|
|||||||
CheckFeature clientserver
|
CheckFeature clientserver
|
||||||
# remote_foreground() doesn't fail on MS-Windows
|
# remote_foreground() doesn't fail on MS-Windows
|
||||||
CheckNotMSWindows
|
CheckNotMSWindows
|
||||||
|
CheckEnv DISPLAY
|
||||||
|
|
||||||
CheckDefFailure(['remote_foreground(10)'], 'E1013: Argument 1: type mismatch, expected string but got number')
|
CheckDefFailure(['remote_foreground(10)'], 'E1013: Argument 1: type mismatch, expected string but got number')
|
||||||
assert_fails('remote_foreground("NonExistingServer")', 'E241:')
|
assert_fails('remote_foreground("NonExistingServer")', 'E241:')
|
||||||
enddef
|
enddef
|
||||||
|
|||||||
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3108,
|
||||||
/**/
|
/**/
|
||||||
3107,
|
3107,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user