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)
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim
index 9513ad3..af90ddc 100644
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -519,6 +519,20 @@
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