]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.0.0507: client-server tests fail when $DISPLAY is not set v8.0.0507
authorBram Moolenaar <Bram@vim.org>
Sat, 25 Mar 2017 14:20:06 +0000 (15:20 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 25 Mar 2017 14:20:06 +0000 (15:20 +0100)
Problem:    Client-server tests fail when $DISPLAY is not set.
Solution:   Check for E240 before running the test.

src/testdir/test_clientserver.vim
src/testdir/test_quotestar.vim
src/version.c

index c98fc026ae1e0e21ec2ffbe88f67ecc768600be0..58ced56ce3115d88d5b4f041537191b84faba0cf 100644 (file)
@@ -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
index d0dd04f91d8d5fc6827ef15d88b9eb5a00b1970d..6e4e4caea7707bf1a116661d7f2ab3a968c4f961 100644 (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
index e19da86a1296f5e272bbf2b8849df4e9c8a2cad9..1f82ee1dc8988a48988ec1312637ff65bdfb68c4 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    507,
 /**/
     506,
 /**/