aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-25 22:02:29 +0800
committerGitHub <noreply@github.com>2022-08-25 22:02:29 +0800
commit22f920030214c0023525c59daf763441baddba1a (patch)
tree612a7d55cc051dd654a883512373fc3e2c20bdee /src/nvim/testdir
parent99f8d34c8a7128a9adb43168ca5364ccbd568333 (diff)
parent22536eb527e4e42ce5dfbf562678ebd060ae6988 (diff)
downloadrneovim-22f920030214c0023525c59daf763441baddba1a.tar.gz
rneovim-22f920030214c0023525c59daf763441baddba1a.tar.bz2
rneovim-22f920030214c0023525c59daf763441baddba1a.zip
Merge pull request #19945 from zeertzjq/vim-8.2.0911
vim-patch:8.2.{0911,0923}: cmdwin interrupted
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index b7c6c1e4d1..84dc361529 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -3,6 +3,7 @@
source check.vim
source screendump.vim
source view_util.vim
+source shared.vim
func Test_complete_tab()
call writefile(['testfile'], 'Xtestfile')
@@ -1453,6 +1454,32 @@ func Test_cmdwin_tabpage()
tabclose!
endfunc
+func Test_cmdwin_interrupted()
+ CheckScreendump
+
+ " aborting the :smile output caused the cmdline window to use the current
+ " buffer.
+ let lines =<< trim [SCRIPT]
+ au WinNew * smile
+ [SCRIPT]
+ call writefile(lines, 'XTest_cmdwin')
+
+ let buf = RunVimInTerminal('-S XTest_cmdwin', {'rows': 18})
+ " open cmdwin
+ call term_sendkeys(buf, "q:")
+ call WaitForAssert({-> assert_match('-- More --', term_getline(buf, 18))})
+ " quit more prompt for :smile command
+ call term_sendkeys(buf, "q")
+ call WaitForAssert({-> assert_match('^$', term_getline(buf, 18))})
+ " execute a simple command
+ call term_sendkeys(buf, "aecho 'done'\<CR>")
+ call VerifyScreenDump(buf, 'Test_cmdwin_interrupted', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XTest_cmdwin')
+endfunc
+
" Test for backtick expression in the command line
func Test_cmd_backtick()
CheckNotMSWindows " FIXME: see #19297