* Bram Moolenaar <[email protected]> [2018-03-07 22:09 +0100]: > > Elimar Riesebieter wrote: > > > * Bram Moolenaar <[email protected]> [2018-03-06 19:51 +0100]: > > > > > > > > Patch 8.0.1587 > > > Problem: inserting from the clipboard doesn't work literally > > > Solution: When pasting from the * or + register always assume literally. > > > Files: src/ops.c, src/proto/ops.pro, src/edit.c, src/ops.c, > > > src/testdir/test_paste.vim > > > > > > > > [...] > > > *************** > > > *** 66,71 **** > > > --- 66,82 ---- > > > 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(':')) > > > > Building gtk version on TERM=tmux-256color I get: > > > > From test_paste.vim: > > Found errors in Test_paste_clipboard(): > > function RunTheTest[38]..Test_paste_clipboard line 7: Expected > > 'nasty\e:!ls\rcommand' but got 'nasty' > > TEST FAILURE > > Strange. It works fine for me, and Travis also passes. > Why would it fail for you?
Using single quotes instead of double quotes succeeded the test. I am building in $SHADOWDIR's and not sure whether the attached patch is correct, though.... >From 556dfb84dfda8b2a48d55583905ba7351cfb75b1 Mon Sep 17 00:00:00 2001 From: Elimar Riesebieter <[email protected]> Date: Wed, 7 Mar 2018 23:56:02 +0100 Subject: [PATCH] Use single quotes in test_paste.vim --- src/testdir/test_paste.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testdir/test_paste.vim b/src/testdir/test_paste.vim index 6450989ec..e846fa62f 100644 --- a/src/testdir/test_paste.vim +++ b/src/testdir/test_paste.vim @@ -70,10 +70,10 @@ func Test_paste_clipboard() if !has('clipboard') return endif - let @+ = "nasty\<Esc>:!ls\<CR>command" + let @+ = 'nasty\<Esc>:!ls\<CR>command' new exe "normal i\<C-R>+\<Esc>" - call assert_equal("nasty\<Esc>:!ls\<CR>command", getline(1)) + call assert_equal('nasty\<Esc>:!ls\<CR>command', getline(1)) bwipe! endfunc -- 2.16.2 Thanks Elimar -- On the keyboard of life you have always to keep a finger at the escape key;-) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
