Skip to content

Commit c5cf369

Browse files
committed
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)
1 parent a0c8aea commit c5cf369

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

src/testdir/test_clientserver.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ func Test_client_server()
4343
" When using valgrind it takes much longer.
4444
call WaitForAssert({-> assert_match(name, serverlist())})
4545

46+
if !has('win32')
47+
if RunVim([], [], '--serverlist >Xtest_serverlist')
48+
let lines = readfile('Xtest_serverlist')
49+
call assert_true(index(lines, 'XVIMTEST') >= 0)
50+
endif
51+
call delete('Xtest_serverlist')
52+
endif
53+
4654
eval name->remote_foreground()
4755

4856
call remote_send(name, ":let testvar = 'yes'\<CR>")

src/testdir/test_startup.vim

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,21 @@ func Test_E_arg()
11211121
endif
11221122
endfunc
11231123

1124+
" Test for the "-D" (debugger) argument
1125+
func Test_D_arg()
1126+
CheckRunVimInTerminal
1127+
1128+
let cmd = GetVimCommandCleanTerm() .. ' -D'
1129+
let buf = term_start(cmd, {'term_rows' : 10})
1130+
call WaitForAssert({-> assert_equal("running", term_getstatus(buf))})
1131+
1132+
call WaitForAssert({-> assert_equal('Entering Debug mode. Type "cont" to continue.',
1133+
\ term_getline(buf, 7))})
1134+
call WaitForAssert({-> assert_equal('>', term_getline(buf, 10))})
1135+
1136+
call StopVimInTerminal(buf)
1137+
endfunc
1138+
11241139
" Test for too many edit argument errors
11251140
func Test_too_many_edit_args()
11261141
" Can't catch the output of gvim.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2632,
753755
/**/
754756
2631,
755757
/**/

0 commit comments

Comments
 (0)