1
0
forked from aniani/vim

patch 8.2.0275: some Ex code not covered by tests

Problem:    Some Ex code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes #5659)
This commit is contained in:
Bram Moolenaar
2020-02-18 21:54:41 +01:00
parent 9e2bcb5d23
commit 406cd90f19
8 changed files with 147 additions and 1 deletions

View File

@@ -519,6 +519,20 @@ func Test_quit_with_arglist()
call term_sendkeys(buf, ":quit\n")
call WaitForAssert({-> assert_match('^E173:', term_getline(buf, 6))})
call StopVimInTerminal(buf)
" Try :confirm quit with unedited files in arglist
let buf = RunVimInTerminal('', {'rows': 6})
call term_sendkeys(buf, ":set nomore\n")
call term_sendkeys(buf, ":args a b c\n")
call term_sendkeys(buf, ":confirm quit\n")
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$',
\ term_getline(buf, 6))})
call term_sendkeys(buf, "N")
call term_sendkeys(buf, ":confirm quit\n")
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$',
\ term_getline(buf, 6))})
call term_sendkeys(buf, "Y")
call StopVimInTerminal(buf)
endfunc
" vim: shiftwidth=2 sts=2 expandtab