summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_eval.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_eval.in')
-rw-r--r--src/testdir/test_eval.in17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
index cd605af56e..b9f68f75c7 100644
--- a/src/testdir/test_eval.in
+++ b/src/testdir/test_eval.in
@@ -1,7 +1,6 @@
Test for various eval features. vim: set ft=vim :
-Note: system clipboard support is not tested. I do not think anybody will thank
-me for messing with clipboard.
+Note: system clipboard is saved, changed and restored.
STARTTEST
:so small.vim
@@ -122,7 +121,19 @@ call SetReg('/', ['abc/'])
call SetReg('/', ["abc/\n"])
call SetReg('=', ['"abc/"'])
call SetReg('=', ["\"abc/\n\""])
-
+$put ='{{{1 System clipboard'
+" Save and restore system clipboard.
+" If no connection to X-Server is possible, test should succeed.
+:let _clipreg = ['+', getreg('+'), getregtype('+')]
+:let _clipopt = &cb
+:let &cb='unnamedplus'
+:1y
+:AR +
+:tabdo :windo :echo "hi"
+:3y
+:AR +
+:let &cb=_clipopt
+:call call('setreg', _clipreg)
$put ='{{{1 Errors'
call ErrExe('call setreg()')
call ErrExe('call setreg(1)')