]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0823: tests: Test_clientserver_servlist_list may fail master v9.2.0823
authorJames McCoy <jamessan@debian.org>
Tue, 21 Jul 2026 16:28:59 +0000 (16:28 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 21 Jul 2026 16:33:22 +0000 (16:33 +0000)
Problem:  tests: Test_clientserver_servlist_list may fail
Solution: Skip Test_clientserver_serverlist_list for non-gvim GUI builds
          (James McCoy)

Running a GUI build that cannot access the GUI clientserver will fail
like below

    command line..script /build/package/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_clientserver_serverlist_list[16]..WaitForAssert[2]..<SNR>4_WaitForCommon[11]..<lambda>23 line 1: Pattern 'XVIMTEST' does not match ''
    command line..script /build/package/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_clientserver_serverlist_list line 18: Expected 'list<string>' but got 'string'
    Caught exception in Test_clientserver_serverlist_list(): Vim(call):E897: List or Blob required @ command line..script /build/package/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_clientserver_serverlist_list, line 19

closes: #20719

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_clientserver.vim
src/version.c

index 4a7763ffab96f3190e793e2c5452232982712777..3c39d01c240b7ee14fa7d2ce80285008a46919a2 100644 (file)
@@ -549,6 +549,12 @@ endfunc
 func Test_clientserver_serverlist_list()
   CheckNotGui
 
+  " CheckNotGui has already confirmed gvim is not being used to run this test.
+  " However, if this is a GUI _build_ of vim, then the running Vim process
+  " will already have selected _not_ to use socket clientserver. Therefore, we
+  " either need the ability to use the GUI clientserver or to skip the test.
+  call Check_X11_Connection()
+
   let g:test_is_flaky = 1
   let cmd = GetVimCommand()
 
@@ -567,7 +573,7 @@ func Test_clientserver_serverlist_list()
   call assert_equal('list<string>', typename(serverlist(#{list: v:true})))
   call assert_true(serverlist(#{list: v:true})->index('XVIMTEST') != -1)
 
-  if has('win32') || has('gui_running')
+  if has('win32')
     call job_stop(job, 'kill')
   else
     call system(actual .. " --remote-expr 'execute(\"qa!\")'")
index 267d273de16a7106f294503b511a4ea1492db4a0..bdf8cac8c44f427528f966182c9778c11f32930a 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    823,
 /**/
     822,
 /**/