Permalink
Browse files

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.
  • Loading branch information...
brammool committed Mar 25, 2017
1 parent 6c0c1e8 commit a2845b8f5a3058c8c89699771ffd4d69513b097d
Showing with 22 additions and 0 deletions.
  1. +11 −0 src/testdir/test_clientserver.vim
  2. +9 −0 src/testdir/test_quotestar.vim
  3. +2 −0 src/version.c
@@ -11,6 +11,17 @@ func Test_client_server()
if cmd == ''
return
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 cmd .= ' --servername ' . name
@@ -39,6 +39,15 @@ func Do_test_quotestar_for_x11()
if cmd == ''
return 'GetVimCommand() failed'
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 cmd .= ' --servername ' . name
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 507,
/**/
506,
/**/

0 comments on commit a2845b8

Please sign in to comment.