summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-01-27 22:52:15 +0100
committerBram Moolenaar <Bram@vim.org>2015-01-27 22:52:15 +0100
commit4ac163ae5f137af236931e778660cf7878d70c25 (patch)
tree89d0f00d5bbf3d85682c74628ca0f5b2119088d0
parent73a156bf362caed3b42f834e90e4409cf4d1df9b (diff)
updated for version 7.4.608v7.4.608
Problem: test_eval fails when the clipboard feature is missing. Solution: Skip part of the test. Reduce the text used.
-rw-r--r--src/testdir/test_eval.in33
-rw-r--r--src/testdir/test_eval.okbin11538 -> 11246 bytes
-rw-r--r--src/version.c2
3 files changed, 24 insertions, 11 deletions
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
index b9f68f75c7..b0ac3a0290 100644
--- a/src/testdir/test_eval.in
+++ b/src/testdir/test_eval.in
@@ -2,13 +2,19 @@ Test for various eval features. vim: set ft=vim :
Note: system clipboard is saved, changed and restored.
+clipboard contents
+something else
+
STARTTEST
:so small.vim
:set encoding=latin1
:set noswapfile
:lang C
:fun AppendRegContents(reg)
- call append('$', printf('%s: type %s; value: %s (%s), expr: %s (%s)', a:reg, getregtype(a:reg), getreg(a:reg), string(getreg(a:reg, 0, 1)), getreg(a:reg, 1), string(getreg(a:reg, 1, 1))))
+ call AppendRegParts(a:reg, getregtype(a:reg), getreg(a:reg), string(getreg(a:reg, 0, 1)), getreg(a:reg, 1), string(getreg(a:reg, 1, 1)))
+:endfun
+:fun AppendRegParts(reg, type, cont, strcont, cont1, strcont1)
+ call append('$', printf('%s: type %s; value: %s (%s), expr: %s (%s)', a:reg, a:type, a:cont, a:strcont, a:cont1, a:strcont1))
endfun
:command -nargs=? AR :call AppendRegContents(<q-args>)
:fun SetReg(...)
@@ -122,18 +128,23 @@ call SetReg('/', ["abc/\n"])
call SetReg('=', ['"abc/"'])
call SetReg('=', ["\"abc/\n\""])
$put ='{{{1 System clipboard'
+if has('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)
+let _clipreg = ['+', getreg('+'), getregtype('+')]
+let _clipopt = &cb
+let &cb='unnamedplus'
+5y
+AR +
+tabdo :windo :echo "hi"
+6y
+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']")
+endif
$put ='{{{1 Errors'
call ErrExe('call setreg()')
call ErrExe('call setreg(1)')
diff --git a/src/testdir/test_eval.ok b/src/testdir/test_eval.ok
index 5e8d2cc4f6..c4fc9ac0b2 100644
--- a/src/testdir/test_eval.ok
+++ b/src/testdir/test_eval.ok
Binary files differ
diff --git a/src/version.c b/src/version.c
index 1c4693f25f..8e26439815 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 608,
+/**/
607,
/**/
606,