patch 9.1.1733: tests: failure when remote_server() fails Commit: https://github.com/vim/vim/commit/4daf031253de690de957a85b0a8d4565b0851ea7 Author: Christian Brabandt <c...@256bit.org> Date: Fri Sep 5 17:21:51 2025 +0200
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 <c...@256bit.org> diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim index 4bda0caef..24d914096 100644 --- a/src/testdir/test_clientserver.vim +++ b/src/testdir/test_clientserver.vim @@ -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') diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index aac831794..8b84a47ec 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -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() diff --git a/src/testdir/test_wayland.vim b/src/testdir/test_wayland.vim index 3308b2a93..4b0fcd78c 100644 --- a/src/testdir/test_wayland.vim +++ b/src/testdir/test_wayland.vim @@ -55,10 +55,9 @@ func s:CheckXConnection() CheckFeature x11 try call remote_send('xxx', '') + catch /^Vim\%(( \+)\)\=: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 diff --git a/src/testdir/util/check.vim b/src/testdir/util/check.vim index aa8eceb62..f6bf8dfdb 100644 --- a/src/testdir/util/check.vim +++ b/src/testdir/util/check.vim @@ -329,6 +329,17 @@ func CheckGithubActions() endif endfunc +command CheckSocketServer call CheckSocketServer() +func CheckSocketServer() + if v:servername == "" + try + call remote_startserver('VIMSOCKETSERVERTEST') + catch /^Vim\%(( \+)\)\=: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 diff --git a/src/version.c b/src/version.c index b28f72e8b..aea569a25 100644 --- a/src/version.c +++ b/src/version.c @@ -724,6 +724,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1733, /**/ 1732, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1uuYO4-005lfx-EK%40256bit.org.