Mercurial > vim
comparison src/testdir/test_terminal.vim @ 13440:22439cdda382 v8.0.1594
patch 8.0.1594: :conform qall not tested with active terminal window
commit https://github.com/vim/vim/commit/435acdb88c849c6bac44ef30f24f29618b36af50
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 10 20:51:25 2018 +0100
patch 8.0.1594: :conform qall not tested with active terminal window
Problem: :conform qall not tested with active terminal window.
Solution: Add a test.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 10 Mar 2018 21:00:07 +0100 |
parents | 33eea5ce5415 |
children | 9f06f7aca74c |
comparison
equal
deleted
inserted
replaced
13439:1193cb481eef | 13440:22439cdda382 |
---|---|
883 call WaitFor({-> term_getstatus(buf) == "finished"}) | 883 call WaitFor({-> term_getstatus(buf) == "finished"}) |
884 | 884 |
885 " close the terminal window where Vim was running | 885 " close the terminal window where Vim was running |
886 quit | 886 quit |
887 endfunc | 887 endfunc |
888 | |
889 " Run Vim in a terminal, then start a terminal in that Vim without a kill | |
890 " argument, check that :confirm qall works. | |
891 func Test_terminal_qall_prompt() | |
892 if !CanRunVimInTerminal() | |
893 return | |
894 endif | |
895 let buf = RunVimInTerminal('', {}) | |
896 | |
897 " Open a terminal window and wait for the prompt to appear | |
898 call term_sendkeys(buf, ":term\<CR>") | |
899 call WaitFor({-> term_getline(buf, 10) =~ '\[running]'}) | |
900 call WaitFor({-> term_getline(buf, 1) !~ '^\s*$'}) | |
901 | |
902 " make Vim exit, it will prompt to kill the shell | |
903 call term_sendkeys(buf, "\<C-W>:confirm qall\<CR>") | |
904 call WaitFor({-> term_getline(buf, 20) =~ 'ancel:'}) | |
905 call term_sendkeys(buf, "y") | |
906 call WaitFor({-> term_getstatus(buf) == "finished"}) | |
907 | |
908 " close the terminal window where Vim was running | |
909 quit | |
910 endfunc |