# HG changeset patch # User Bram Moolenaar # Date 1616275802 -3600 # Node ID 493870e7f61d37040e3b4ad9c1a827e9e01362dd # Parent 0c277b7cef05851c6a56cf2500f714dc2a99a3b3 patch 8.2.2632: not all command line arguments are tested Commit: https://github.com/vim/vim/commit/c5cf369e9543ff065e2e1da91da3218c223840e2 Author: Bram Moolenaar Date: Sat Mar 20 22:16:56 2021 +0100 patch 8.2.2632: not all command line arguments are tested Problem: Not all command line arguments are tested. Solution: Add tests for -D and -serverlist. (Dominique Pell?, closes https://github.com/vim/vim/issues/7992) diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim --- a/src/testdir/test_clientserver.vim +++ b/src/testdir/test_clientserver.vim @@ -43,6 +43,14 @@ func Test_client_server() " When using valgrind it takes much longer. call WaitForAssert({-> assert_match(name, serverlist())}) + if !has('win32') + if RunVim([], [], '--serverlist >Xtest_serverlist') + let lines = readfile('Xtest_serverlist') + call assert_true(index(lines, 'XVIMTEST') >= 0) + endif + call delete('Xtest_serverlist') + endif + eval name->remote_foreground() call remote_send(name, ":let testvar = 'yes'\") diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -1121,6 +1121,21 @@ func Test_E_arg() endif endfunc +" Test for the "-D" (debugger) argument +func Test_D_arg() + CheckRunVimInTerminal + + let cmd = GetVimCommandCleanTerm() .. ' -D' + let buf = term_start(cmd, {'term_rows' : 10}) + call WaitForAssert({-> assert_equal("running", term_getstatus(buf))}) + + call WaitForAssert({-> assert_equal('Entering Debug mode. Type "cont" to continue.', + \ term_getline(buf, 7))}) + call WaitForAssert({-> assert_equal('>', term_getline(buf, 10))}) + + call StopVimInTerminal(buf) +endfunc + " Test for too many edit argument errors func Test_too_many_edit_args() " Can't catch the output of gvim. diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2632, +/**/ 2631, /**/ 2630,