summaryrefslogtreecommitdiff
path: root/src/testdir/test_paste.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-03-06 19:51:13 +0100
committerBram Moolenaar <Bram@vim.org>2018-03-06 19:51:13 +0100
commit3324d0a86421a634572758dcfde917547f4d4c67 (patch)
tree6b110fec6247516506f1235179cf52d3a8a63b6e /src/testdir/test_paste.vim
parent201dc67db587e77a845fd24681352d61e57156e2 (diff)
downloadvim-git-3324d0a86421a634572758dcfde917547f4d4c67.tar.gz
patch 8.0.1587: inserting from the clipboard doesn't work literallyv8.0.1587
Problem: inserting from the clipboard doesn't work literally Solution: When pasting from the * or + register always assume literally.
Diffstat (limited to 'src/testdir/test_paste.vim')
-rw-r--r--src/testdir/test_paste.vim13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/testdir/test_paste.vim b/src/testdir/test_paste.vim
index 440dc7f1f..6450989ec 100644
--- a/src/testdir/test_paste.vim
+++ b/src/testdir/test_paste.vim
@@ -1,4 +1,4 @@
-" Tests for bracketed paste.
+" Tests for bracketed paste and other forms of pasting.
" Bracketed paste only works with "xterm". Not in GUI.
if has('gui_running')
@@ -66,6 +66,17 @@ func Test_paste_insert_mode()
bwipe!
endfunc
+func Test_paste_clipboard()
+ if !has('clipboard')
+ return
+ endif
+ let @+ = "nasty\<Esc>:!ls\<CR>command"
+ new
+ exe "normal i\<C-R>+\<Esc>"
+ call assert_equal("nasty\<Esc>:!ls\<CR>command", getline(1))
+ bwipe!
+endfunc
+
func Test_paste_cmdline()
call feedkeys(":a\<Esc>[200~foo\<CR>bar\<Esc>[201~b\<Home>\"\<CR>", 'xt')
call assert_equal("\"afoo\<CR>barb", getreg(':'))