summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_clientserver.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-25 15:20:06 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-25 15:20:06 +0100
commita2845b8f5a3058c8c89699771ffd4d69513b097d (patch)
tree91a7aec225fe0293da00f6f8261c1986c0cff9ab /src/testdir/test_clientserver.vim
parent6c0c1e8052811a818739e2f3d543291b7a347ad0 (diff)
patch 8.0.0507: client-server tests fail when $DISPLAY is not setv8.0.0507
Problem: Client-server tests fail when $DISPLAY is not set. Solution: Check for E240 before running the test.
Diffstat (limited to 'src/testdir/test_clientserver.vim')
-rw-r--r--src/testdir/test_clientserver.vim11
1 files changed, 11 insertions, 0 deletions
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