diff src/testdir/test_popupwin.vim @ 22518:81ae5fa92928 v8.2.1807

patch 8.2.1807: can use :help in a terminal popup window Commit: https://github.com/vim/vim/commit/349f609f8990a3aca9a4b8faa0585d75e03116db Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 6 20:46:49 2020 +0200 patch 8.2.1807: can use :help in a terminal popup window Problem: Can use :help in a terminal popup window. Solution: Give an error. (closes https://github.com/vim/vim/issues/7088)
author Bram Moolenaar <Bram@vim.org>
date Tue, 06 Oct 2020 21:00:03 +0200
parents 73be82f278c0
children d5ce7dd60dc1
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -2645,6 +2645,10 @@ func Test_popupwin_terminal_buffer()
   let g:test_is_flaky = 1
 
   let origwin = win_getid()
+
+  " open help window to test that :help below fails
+  help
+
   let termbuf = term_start(&shell, #{hidden: 1})
   let winid = popup_create(termbuf, #{minwidth: 40, minheight: 10})
   " Wait for shell to start
@@ -2666,6 +2670,7 @@ func Test_popupwin_terminal_buffer()
 
   " Cannot escape from terminal window
   call assert_fails('tab drop xxx', 'E863:')
+  call assert_fails('help', 'E994:')
 
   " Cannot open a second one.
   let termbuf2 = term_start(&shell, #{hidden: 1})
@@ -2677,6 +2682,7 @@ func Test_popupwin_terminal_buffer()
   " Wait for shell to exit
   call WaitForAssert({-> assert_equal("dead", job_status(term_getjob(termbuf)))})
 
+  helpclose
   call feedkeys(":quit\<CR>", 'xt')
   call assert_equal(origwin, win_getid())
 endfunc