Elimar Riesebieter wrote:

> > > * Bram Moolenaar <b...@moolenaar.net> [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....

It is not.  "\<Esc>" becomes a real Esc character, while in
single quotes you get 6 characters.  We need the Esc character for this
test.


-- 
I once paid $12 to peer at the box that held King Tutankhamen's little
bandage-covered midget corpse at the De Young Museum in San Francisco.  I
remember thinking how pleased he'd be about the way things turned out in his
afterlife.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui