diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-02-25 06:11:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-02-25 06:11:53 +0100 |
commit | 5b868a82ed2151201350122fcdb75b35c557c528 (patch) | |
tree | 4127d05b2775bdebfce1bf6881e0630aa4fcc1d1 /src/testdir | |
parent | 58d63a0a2364e1f06a80550f9f5038145b339171 (diff) | |
download | vim-git-5b868a82ed2151201350122fcdb75b35c557c528.tar.gz |
patch 8.1.0981: pasting in terminal insufficiently testedv8.1.0981
Problem: Pasting in terminal insufficiently tested.
Solution: Add more tests. (Dominique Pelle, closes #4040)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_terminal.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index e5a7be5a8..aed729ec3 100644 --- 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') |