File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -885,3 +885,26 @@ func Test_terminal_qall_kill_func()
885885 " close the terminal window where Vim was running
886886 quit
887887endfunc
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
Original file line number Diff line number Diff line change @@ -766,6 +766,8 @@ static char *(features[]) =
766766
767767static int included_patches [] =
768768{ /* Add new patch number below this line */
769+ /**/
770+ 1594 ,
769771/**/
770772 1593 ,
771773/**/
You can’t perform that action at this time.
0 commit comments