vim-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.
a2845b8f5a
This commit is contained in:
ckelsel 2018-05-30 08:40:40 +08:00
parent f711b63513
commit bce3e95691

View File

@ -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