Christian wrote: > On Do, 08 Mär 2018, Bram Moolenaar wrote: > > > 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 am seeing the same error, when running Vim in a session without access > to the + clipboard. Perhaps we need to make sure, that accessing the > clipboard "should" work: > > diff --git a/src/testdir/test_paste.vim b/src/testdir/test_paste.vim > index 6450989ec..0f4ecc290 100644 > --- a/src/testdir/test_paste.vim > +++ b/src/testdir/test_paste.vim > @@ -67,13 +67,13 @@ func Test_paste_insert_mode() > endfunc > > func Test_paste_clipboard() > - if !has('clipboard') > + if !(has('clipboard') && (has("win32") || exists("$DISPLAY"))) > 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)) > + call assert_equal(["nasty\<Esc>:!ls\<CR>command", ""], getline(1,2)) > bwipe! > endfunc
Let's make a function for that, we may need it in other places as well. > The reason for the second change in the test is, that when pasting > literally does not work, Vim might insert > ,---- > | nasty > | mmandc > `---- > > However, don't know, why the '+' register works differently, when > there is no access to the clipboard. Hmm, there might not be a second line if the test passes. -- hundred-and-one symptoms of being an internet addict: 3. Your bookmark takes 15 minutes to scroll from top to bottom. /// 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.