]> granicus.if.org Git - vim/commitdiff
patch 8.1.0981: pasting in terminal insufficiently tested v8.1.0981
authorBram Moolenaar <Bram@vim.org>
Mon, 25 Feb 2019 05:11:53 +0000 (06:11 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 25 Feb 2019 05:11:53 +0000 (06:11 +0100)
Problem:    Pasting in terminal insufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes #4040)

src/testdir/test_terminal.vim
src/version.c

index e5a7be5a8e75b75f7bc0b8fac3d04ed86a17420d..aed729ec3fb547ba672695fd40bb97adf9326d86 100644 (file)
@@ -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')
index e802aafdc5897a1ff920500ee0b920735af5d092..cf47f21a412437fcce3deef91f8832e45132389f 100644 (file)
@@ -779,6 +779,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    981,
 /**/
     980,
 /**/