Mercurial > vim
comparison src/testdir/test_arglist.vim @ 19370:02111977dd05 v8.2.0243
patch 8.2.0243: insufficient code coverage for ex_docmd.c functions
Commit: https://github.com/vim/vim/commit/9f6277bdde97b7767ded43a0b5a2023eb601b3b7
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 11 22:04:02 2020 +0100
patch 8.2.0243: insufficient code coverage for ex_docmd.c functions
Problem: Insufficient code coverage for ex_docmd.c functions.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5618)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 11 Feb 2020 22:15:04 +0100 |
parents | 2e53305f2239 |
children | 8f8a5a15d00a |
comparison
equal
deleted
inserted
replaced
19369:05c259d4233d | 19370:02111977dd05 |
---|---|
1 " Test argument list commands | 1 " Test argument list commands |
2 | |
3 source shared.vim | |
4 source term_util.vim | |
2 | 5 |
3 func Test_argidx() | 6 func Test_argidx() |
4 args a b c | 7 args a b c |
5 last | 8 last |
6 call assert_equal(2, argidx()) | 9 call assert_equal(2, argidx()) |
503 let l = [] | 506 let l = [] |
504 argdo call add(l, expand('%')) | 507 argdo call add(l, expand('%')) |
505 call assert_equal(['Xa.c', 'Xb.c', 'Xc.c'], l) | 508 call assert_equal(['Xa.c', 'Xb.c', 'Xc.c'], l) |
506 bwipe Xa.c Xb.c Xc.c | 509 bwipe Xa.c Xb.c Xc.c |
507 endfunc | 510 endfunc |
511 | |
512 " Test for quiting Vim with unedited files in the argument list | |
513 func Test_quit_with_arglist() | |
514 if !CanRunVimInTerminal() | |
515 throw 'Skipped: cannot run vim in terminal' | |
516 endif | |
517 let buf = RunVimInTerminal('', {'rows': 6}) | |
518 call term_sendkeys(buf, ":args a b c\n") | |
519 call term_sendkeys(buf, ":quit\n") | |
520 call WaitForAssert({-> assert_match('^E173:', term_getline(buf, 6))}) | |
521 call StopVimInTerminal(buf) | |
522 endfunc | |
523 | |
524 " vim: shiftwidth=2 sts=2 expandtab |