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>
func Test_clientserver_serverlist_list()
CheckNotGui
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()
let g:test_is_flaky = 1
let cmd = GetVimCommand()
call assert_equal('list<string>', typename(serverlist(#{list: v:true})))
call assert_true(serverlist(#{list: v:true})->index('XVIMTEST') != -1)
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')
call job_stop(job, 'kill')
else
call system(actual .. " --remote-expr 'execute(\"qa!\")'")
call job_stop(job, 'kill')
else
call system(actual .. " --remote-expr 'execute(\"qa!\")'")
static int included_patches[] =
{ /* Add new patch number below this line */
static int included_patches[] =
{ /* Add new patch number below this line */