0
0
mirror of https://github.com/vim/vim.git synced 2025-10-20 08:14:18 -04:00

patch 9.1.1733: tests: failure when remote_server() fails

Problem:  tests: failure when remote_server() fails
Solution: Catch E240 error when calling remote_server(), Fix syntax
          error in test_wayland.vim

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2025-09-05 17:21:51 +02:00
parent f1212a7b45
commit 4daf031253
5 changed files with 17 additions and 9 deletions

View File

@@ -12,9 +12,7 @@ source util/shared.vim
" Unlike X11, we need the socket server running if we want to send commands to
" a server via sockets.
if v:servername == ""
call remote_startserver('VIMSOCKETSERVERTEST')
endif
CheckSocketServer
func Check_X11_Connection()
if has('x11')

View File

@@ -4,9 +4,7 @@ source util/screendump.vim
import './util/vim9.vim' as v9
" Socket backend for remote functions require the socket server to be running
if v:servername == ""
call remote_startserver('VIMSOCKETSERVERTEST')
endif
CheckSocketServer
" Test for passing too many or too few arguments to builtin functions
func Test_internalfunc_arg_error()

View File

@@ -55,10 +55,9 @@ func s:CheckXConnection()
CheckFeature x11
try
call remote_send('xxx', '')
catch /^Vim\%((\a\+)\)\=:E240:/ " not possible to start a remote server
throw 'Skipped: No connection to the X server possible'
catch
if v:exception =~ 'E240:'
thrclientserverow 'Skipped: no connection to the X server'
endif
" ignore other errors
endtry
endfunc

View File

@@ -329,6 +329,17 @@ func CheckGithubActions()
endif
endfunc
command CheckSocketServer call CheckSocketServer()
func CheckSocketServer()
if v:servername == ""
try
call remote_startserver('VIMSOCKETSERVERTEST')
catch /^Vim\%((\a\+)\)\=:E240:/ " not possible to start a remote server
throw 'Skipped: Cannot start remote server'
endtry
endif
endfunc
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -724,6 +724,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1733,
/**/
1732,
/**/