Mercurial > vim
changeset 15951:2c18aaf66e77 v8.1.0981
patch 8.1.0981: pasting in terminal insufficiently tested
commit https://github.com/vim/vim/commit/5b868a82ed2151201350122fcdb75b35c557c528
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 25 06:11:53 2019 +0100
patch 8.1.0981: pasting in terminal insufficiently tested
Problem: Pasting in terminal insufficiently tested.
Solution: Add more tests. (Dominique Pelle, closes https://github.com/vim/vim/issues/4040)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 25 Feb 2019 06:15:05 +0100 |
parents | 1bebb061a6fc |
children | 6121ab672b3e |
files | src/testdir/test_terminal.vim src/version.c |
diffstat | 2 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -82,6 +82,21 @@ func Test_terminal_make_change() unlet g:job 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() let buf = Run_shell_in_terminal({}) call assert_fails(buf . 'bwipe', 'E517')