]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.608 v7.4.608
authorBram Moolenaar <Bram@vim.org>
Tue, 27 Jan 2015 21:52:15 +0000 (22:52 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 27 Jan 2015 21:52:15 +0000 (22:52 +0100)
Problem:    test_eval fails when the clipboard feature is missing.
Solution:   Skip part of the test. Reduce the text used.

src/testdir/test_eval.in
src/testdir/test_eval.ok
src/version.c

index b9f68f75c7c6cb66ff414d44b467aa666050c9df..b0ac3a0290d4ab7c68206ca00b2fbb22f30281f5 100644 (file)
@@ -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)')
index 5e8d2cc4f6f0caa2b4386ceec8b3addb70c419a2..c4fc9ac0b2a25bbc32abf447331a2ebbc6b14755 100644 (file)
Binary files a/src/testdir/test_eval.ok and b/src/testdir/test_eval.ok differ
index 1c4693f25fab37f86377e7e58c3f9c49d90c42ac..8e264398158f793007db00b67b601d3aa98d3d55 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    608,
 /**/
     607,
 /**/