]> granicus.if.org Git - vim/commitdiff
patch 8.2.2632: not all command line arguments are tested v8.2.2632
authorBram Moolenaar <Bram@vim.org>
Sat, 20 Mar 2021 21:16:56 +0000 (22:16 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 20 Mar 2021 21:16:56 +0000 (22:16 +0100)
Problem:    Not all command line arguments are tested.
Solution:   Add tests for -D and -serverlist. (Dominique PellĂ©, closes #7992)

src/testdir/test_clientserver.vim
src/testdir/test_startup.vim
src/version.c

index 6a73d93e5b11cc3b87f3b1dd7b4d458ddc2d4b03..2704fb668d9eaff369a64f77b9b165b6d570a423 100644 (file)
@@ -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'\<CR>")
index 17ac94d695cdc439c5901cf364a1e4df3b4e9e50..ae12f61873da0a48b660c649bedea4bda328ac6d 100644 (file)
@@ -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.
index 420480601ed217fbaa6cb647fc24feade05d3cb3..be2c759d99fa5b4875602f7cfe5d5a77d63daa21 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2632,
 /**/
     2631,
 /**/