On 2015/01/29, at 6:39, Bram Moolenaar <[email protected]> wrote:
> It's better to not skip the test. Can you try if it works by using
> "unnamed" instead of "unnamedplus" and then using the * register instead
> of +? The * register should work everywhere.
Yes.
The test succeeds (and is not skipped) on my Mac with the patch below.
I'm not sure whether this is also OK on Linux/Windows etc.
Another possibility is not to rely on the &clipboard option but to
explicitly specify the register to use; i.e., replace
5y
by
5y +
(in this case save/set/restore &clipboard is not necessary.)
I feel this is simpler, unless (one of) the intention of the test is
to confirm that the &clipboard option is working as expected.
BTW,
on Mac (and may be on other OS?) the clipboard can contain not only a
simple text but also various types of data, such as graphics or movies.
If I copy a graphics to the clipboard and run 'make check' then the
graphics is lost. Does a similar problem happen on Linux/Windows?
On Linux, is there any difference between "* and "+ ?
I personally feel this is not a serious problem, because if a
user copy a graphics to the clipboard, she/he will usually (or
almost always) paste it immediately before running 'make check'.
diff -r 84171683fd66 src/testdir/test_eval.in
--- a/src/testdir/test_eval.in Tue Jan 27 22:52:15 2015 +0100
+++ b/src/testdir/test_eval.in Thu Jan 29 09:57:38 2015 +0900
@@ -131,19 +131,19 @@
if has('clipboard')
" Save and restore system clipboard.
" If no connection to X-Server is possible, test should succeed.
-let _clipreg = ['+', getreg('+'), getregtype('+')]
+let _clipreg = ['*', getreg('*'), getregtype('*')]
let _clipopt = &cb
-let &cb='unnamedplus'
+let &cb='unnamed'
5y
-AR +
+AR *
tabdo :windo :echo "hi"
6y
-AR +
+AR *
let &cb=_clipopt
call call('setreg', _clipreg)
else
- call AppendRegParts('+', 'V', "clipboard contents\n", "['clipboard
contents']", "clipboard contents\n", "['clipboard contents']")
- call AppendRegParts('+', 'V', "something else\n", "['something else']",
"something else\n", "['something else']")
+ call AppendRegParts('*', 'V', "clipboard contents\n", "['clipboard
contents']", "clipboard contents\n", "['clipboard contents']")
+ call AppendRegParts('*', 'V', "something else\n", "['something else']",
"something else\n", "['something else']")
endif
$put ='{{{1 Errors'
call ErrExe('call setreg()')
diff -r 84171683fd66 src/testdir/test_eval.ok
--- a/src/testdir/test_eval.ok Tue Jan 27 22:52:15 2015 +0100
+++ b/src/testdir/test_eval.ok Thu Jan 29 09:57:38 2015 +0900
@@ -317,8 +317,8 @@
{{{2 setreg('=', ['"abc/ "'])
=: type v; value: abc/ (['abc/ ']), expr: "abc/ " (['"abc/ "'])
{{{1 System clipboard
-+: type V; value: clipboard contents (['clipboard contents']), expr:
clipboard contents (['clipboard contents'])
-+: type V; value: something else (['something else']), expr: something else
(['something else'])
+*: type V; value: clipboard contents (['clipboard contents']), expr:
clipboard contents (['clipboard contents'])
+*: type V; value: something else (['something else']), expr: something else
(['something else'])
{{{1 Errors
Executing call setreg()
Vim(call):E119: Not enough arguments for function: setreg
--
--
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.