0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.0.0507: client-server tests fail when $DISPLAY is not set

Problem:    Client-server tests fail when $DISPLAY is not set.
Solution:   Check for E240 before running the test.
This commit is contained in:
Bram Moolenaar
2017-03-25 15:20:06 +01:00
parent 6c0c1e8052
commit a2845b8f5a
3 changed files with 22 additions and 0 deletions

View File

@@ -11,6 +11,17 @@ func Test_client_server()
if cmd == '' if cmd == ''
return return
endif endif
if has('unix')
try
call remote_send('xxx', '')
catch
if v:exception =~ 'E240:'
" No connection to the X server, give up.
return
endif
" ignore other errors
endtry
endif
let name = 'XVIMTEST' let name = 'XVIMTEST'
let cmd .= ' --servername ' . name let cmd .= ' --servername ' . name

View File

@@ -39,6 +39,15 @@ func Do_test_quotestar_for_x11()
if cmd == '' if cmd == ''
return 'GetVimCommand() failed' return 'GetVimCommand() failed'
endif endif
try
call remote_send('xxx', '')
catch
if v:exception =~ 'E240:'
" No connection to the X server, give up.
return
endif
" ignore other errors
endtry
let name = 'XVIMCLIPBOARD' let name = 'XVIMCLIPBOARD'
let cmd .= ' --servername ' . name let cmd .= ' --servername ' . name

View File

@@ -764,6 +764,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 */
/**/
507,
/**/ /**/
506, 506,
/**/ /**/