Mercurial > vim
comparison src/testdir/test_arglist.vim @ 19471:cb73f4ae6b7c v8.2.0293
patch 8.2.0293: various Ex commands not sufficiently tested
Commit: https://github.com/vim/vim/commit/818fc9ad143911b2faa0d7cee86724aa70a02080
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 21 17:54:45 2020 +0100
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 https://github.com/vim/vim/issues/5673)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 Feb 2020 18:00:05 +0100 |
parents | 8f8a5a15d00a |
children | f70a3c1000bb |
comparison
equal
deleted
inserted
replaced
19470:ddc2e7caff46 | 19471:cb73f4ae6b7c |
---|---|
513 func Test_quit_with_arglist() | 513 func Test_quit_with_arglist() |
514 if !CanRunVimInTerminal() | 514 if !CanRunVimInTerminal() |
515 throw 'Skipped: cannot run vim in terminal' | 515 throw 'Skipped: cannot run vim in terminal' |
516 endif | 516 endif |
517 let buf = RunVimInTerminal('', {'rows': 6}) | 517 let buf = RunVimInTerminal('', {'rows': 6}) |
518 call term_sendkeys(buf, ":set nomore\n") | |
518 call term_sendkeys(buf, ":args a b c\n") | 519 call term_sendkeys(buf, ":args a b c\n") |
519 call term_sendkeys(buf, ":quit\n") | 520 call term_sendkeys(buf, ":quit\n") |
521 call term_wait(buf) | |
520 call WaitForAssert({-> assert_match('^E173:', term_getline(buf, 6))}) | 522 call WaitForAssert({-> assert_match('^E173:', term_getline(buf, 6))}) |
521 call StopVimInTerminal(buf) | 523 call StopVimInTerminal(buf) |
522 | 524 |
523 " Try :confirm quit with unedited files in arglist | 525 " Try :confirm quit with unedited files in arglist |
524 let buf = RunVimInTerminal('', {'rows': 6}) | 526 let buf = RunVimInTerminal('', {'rows': 6}) |
525 call term_sendkeys(buf, ":set nomore\n") | 527 call term_sendkeys(buf, ":set nomore\n") |
526 call term_sendkeys(buf, ":args a b c\n") | 528 call term_sendkeys(buf, ":args a b c\n") |
527 call term_sendkeys(buf, ":confirm quit\n") | 529 call term_sendkeys(buf, ":confirm quit\n") |
530 call term_wait(buf) | |
528 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$', | 531 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$', |
529 \ term_getline(buf, 6))}) | 532 \ term_getline(buf, 6))}) |
530 call term_sendkeys(buf, "N") | 533 call term_sendkeys(buf, "N") |
534 call term_wait(buf) | |
531 call term_sendkeys(buf, ":confirm quit\n") | 535 call term_sendkeys(buf, ":confirm quit\n") |
532 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$', | 536 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$', |
533 \ term_getline(buf, 6))}) | 537 \ term_getline(buf, 6))}) |
534 call term_sendkeys(buf, "Y") | 538 call term_sendkeys(buf, "Y") |
535 call StopVimInTerminal(buf) | 539 call term_wait(buf) |
540 call WaitForAssert({-> assert_equal("finished", term_getstatus(buf))}) | |
541 only! | |
536 endfunc | 542 endfunc |
537 | 543 |
538 " vim: shiftwidth=2 sts=2 expandtab | 544 " vim: shiftwidth=2 sts=2 expandtab |