From a2845b8f5a3058c8c89699771ffd4d69513b097d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 25 Mar 2017 15:20:06 +0100 Subject: 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. --- src/testdir/test_clientserver.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/testdir/test_clientserver.vim') diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim index c98fc026ae..58ced56ce3 100644 --- a/src/testdir/test_clientserver.vim +++ b/src/testdir/test_clientserver.vim @@ -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 -- cgit v1.2.3