From 4aa4675fbface275224d178ebb436bc214dd1056 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 12 Jul 2022 14:45:36 +0800 Subject: vim-patch:8.2.0293: various Ex commands not sufficiently tested Problem: Various Ex commands not sufficiently tested. Solution: Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5673) https://github.com/vim/vim/commit/818fc9ad143911b2faa0d7cee86724aa70a02080 Needs to assert E170 instead of E580 because patch 8.2.3486 has been ported but patch 8.2.1183 hasn't. --- src/nvim/testdir/test_arglist.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/nvim/testdir/test_arglist.vim') diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim index b8a1fe4ebd..ef8d0a88fd 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -520,8 +520,10 @@ func Test_quit_with_arglist() throw 'Skipped: cannot run vim in terminal' endif 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, ":quit\n") + call term_wait(buf) call WaitForAssert({-> assert_match('^E173:', term_getline(buf, 6))}) call StopVimInTerminal(buf) @@ -530,14 +532,18 @@ func Test_quit_with_arglist() call term_sendkeys(buf, ":set nomore\n") call term_sendkeys(buf, ":args a b c\n") call term_sendkeys(buf, ":confirm quit\n") + call term_wait(buf) call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$', \ term_getline(buf, 6))}) call term_sendkeys(buf, "N") + call term_wait(buf) 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) + call term_wait(buf) + call WaitForAssert({-> assert_equal("finished", term_getstatus(buf))}) + only! endfunc " vim: shiftwidth=2 sts=2 expandtab -- cgit