0
0
mirror of https://github.com/vim/vim.git synced 2025-10-10 06:24:10 -04:00

patch 8.1.0981: pasting in terminal insufficiently tested

Problem:    Pasting in terminal insufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes #4040)
This commit is contained in:
Bram Moolenaar
2019-02-25 06:11:53 +01:00
parent 58d63a0a23
commit 5b868a82ed
2 changed files with 17 additions and 0 deletions

View File

@@ -82,6 +82,21 @@ func Test_terminal_make_change()
unlet g:job unlet g:job
endfunc endfunc
func Test_terminal_paste_register()
let @" = "text to paste"
let buf = Run_shell_in_terminal({})
" Wait for the shell to display a prompt
call WaitForAssert({-> assert_notequal('', term_getline(buf, 1))})
call feedkeys("echo \<C-W>\"\" \<C-W>\"=37 + 5\<CR>\<CR>", 'xt')
call WaitForAssert({-> assert_match("echo text to paste 42$", getline(1))})
call WaitForAssert({-> assert_equal('text to paste 42', getline(2))})
exe buf . 'bwipe!'
unlet g:job
endfunc
func Test_terminal_wipe_buffer() func Test_terminal_wipe_buffer()
let buf = Run_shell_in_terminal({}) let buf = Run_shell_in_terminal({})
call assert_fails(buf . 'bwipe', 'E517') call assert_fails(buf . 'bwipe', 'E517')

View File

@@ -779,6 +779,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
981,
/**/ /**/
980, 980,
/**/ /**/