aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_prompt_buffer.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_prompt_buffer.vim')
-rw-r--r--test/old/testdir/test_prompt_buffer.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/old/testdir/test_prompt_buffer.vim b/test/old/testdir/test_prompt_buffer.vim
index 43d8bb4789..2cc3f19b59 100644
--- a/test/old/testdir/test_prompt_buffer.vim
+++ b/test/old/testdir/test_prompt_buffer.vim
@@ -271,6 +271,7 @@ func Test_prompt_appending_while_hidden()
func DoAppend()
call appendbufline('prompt', '$', 'Test')
+ return ''
endfunc
END
call writefile(script, 'XpromptBuffer', 'D')
@@ -283,11 +284,21 @@ func Test_prompt_appending_while_hidden()
call term_sendkeys(buf, "exit\<CR>")
call TermWait(buf)
+ call assert_notmatch('-- INSERT --', term_getline(buf, 10))
call term_sendkeys(buf, ":call DoAppend()\<CR>")
call TermWait(buf)
call assert_notmatch('-- INSERT --', term_getline(buf, 10))
+ call term_sendkeys(buf, "i")
+ call TermWait(buf)
+ call assert_match('-- INSERT --', term_getline(buf, 10))
+
+ call term_sendkeys(buf, "\<C-R>=DoAppend()\<CR>")
+ call TermWait(buf)
+ call assert_match('-- INSERT --', term_getline(buf, 10))
+
+ call term_sendkeys(buf, "\<Esc>")
call StopVimInTerminal(buf)
endfunc