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 #7992)
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 17ac94d..ae12f61 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -1121,6 +1121,21 @@
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.