]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0343: tests: test_clientserver may fail on slower systems v9.2.0343
authorJames McCoy <jamessan@jamessan.com>
Tue, 14 Apr 2026 16:25:50 +0000 (16:25 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 14 Apr 2026 16:25:50 +0000 (16:25 +0000)
Problem:  tests: test_clientserver may fail on slower systems
Solution: Wait for argc() before checking argv() (James McCoy).

On slower systems, the argv() check may run before the server has
populated the arg list.

Add a wait for argc() to be 3 to be more tolerant of such systems

closes: #19974

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

index 8aa9428f2a345e1ed20e6d0c63919f7d6bd51ac7..0ced9cbc41cde01db17aa2cfd6c33128dc35697a 100644 (file)
@@ -145,6 +145,7 @@ func Test_client_server()
 
     " Edit multiple files using --remote
     call system(cmd .. ' --remote Xclientfile1 Xclientfile2 Xclientfile3')
+    call WaitForAssert({-> assert_equal('3', remote_expr(name, 'argc()'))})
     call assert_match(".*Xclientfile1\n.*Xclientfile2\n.*Xclientfile3\n", remote_expr(name, 'argv()'))
     eval name->remote_send(":%bw!\<CR>")
 
index a2c470932ec693384236acc4a112c2d51dd8aef5..0028692f283f0d1bbd011f001ae4c0d92a155798 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    343,
 /**/
     342,
 /**/