mirror of
https://github.com/vim/vim.git
synced 2025-10-21 08:24:06 -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:
@@ -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')
|
||||
|
@@ -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()
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -724,6 +724,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1733,
|
||||
/**/
|
||||
1732,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user