vim/7.4.608

135 lines
4.9 KiB
Plaintext
Raw Normal View History

2015-01-28 17:00:07 +00:00
To: vim_dev@googlegroups.com
Subject: Patch 7.4.608
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.4.608 (after 7.4.598)
Problem: test_eval fails when the clipboard feature is missing.
Solution: Skip part of the test. Reduce the text used.
Files: src/testdir/test_eval.in, src/testdir/test_eval.ok
*** ../vim-7.4.607/src/testdir/test_eval.in 2015-01-27 14:09:29.625898193 +0100
--- src/testdir/test_eval.in 2015-01-27 22:26:03.295256244 +0100
***************
*** 2,14 ****
Note: system clipboard is saved, changed and restored.
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))))
endfun
:command -nargs=? AR :call AppendRegContents(<q-args>)
:fun SetReg(...)
--- 2,20 ----
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 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,139 ****
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)')
--- 128,150 ----
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'
! 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)')
*** ../vim-7.4.607/src/testdir/test_eval.ok 2015-01-27 14:09:29.625898193 +0100
--- src/testdir/test_eval.ok 2015-01-27 22:13:10.407885660 +0100
***************
*** 317,324 ****
{{{2 setreg('=', ['"abc/"'])
=: type v; value: abc/ (['abc/']), expr: "abc/" (['"abc/"'])
{{{1 System clipboard
! +: type V; value: Test for various eval features. vim: set ft=vim : (['Test for various eval features. vim: set ft=vim :']), expr: Test for various eval features. vim: set ft=vim : (['Test for various eval features. vim: set ft=vim :'])
! +: type V; value: Note: system clipboard is saved, changed and restored. (['Note: system clipboard is saved, changed and restored.']), expr: Note: system clipboard is saved, changed and restored. (['Note: system clipboard is saved, changed and restored.'])
{{{1 Errors
Executing call setreg()
Vim(call):E119: Not enough arguments for function: setreg
--- 317,324 ----
{{{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'])
{{{1 Errors
Executing call setreg()
Vim(call):E119: Not enough arguments for function: setreg
*** ../vim-7.4.607/src/version.c 2015-01-27 21:39:01.970698049 +0100
--- src/version.c 2015-01-27 22:49:13.951531829 +0100
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 608,
/**/
--
Birthdays are healthy. The more you have them, the longer you live.
/// Bram Moolenaar -- Bram@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 ///