|
Karsten Hopp |
fa40a8 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
fa40a8 |
Subject: Patch 7.4.889
|
|
Karsten Hopp |
fa40a8 |
Fcc: outbox
|
|
Karsten Hopp |
fa40a8 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
fa40a8 |
Mime-Version: 1.0
|
|
Karsten Hopp |
fa40a8 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
fa40a8 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
fa40a8 |
------------
|
|
Karsten Hopp |
fa40a8 |
|
|
Karsten Hopp |
fa40a8 |
Patch 7.4.889
|
|
Karsten Hopp |
fa40a8 |
Problem: Triggering OptionSet from setwinvar() isn't tested.
|
|
Karsten Hopp |
fa40a8 |
Solution: Add a test. (Christian Brabandt)
|
|
Karsten Hopp |
fa40a8 |
Files: src/testdir/test_autocmd_option.in,
|
|
Karsten Hopp |
fa40a8 |
src/testdir/test_autocmd_option.ok
|
|
Karsten Hopp |
fa40a8 |
|
|
Karsten Hopp |
fa40a8 |
|
|
Karsten Hopp |
fa40a8 |
*** ../vim-7.4.888/src/testdir/test_autocmd_option.in 2015-07-21 10:57:35.379311166 +0200
|
|
Karsten Hopp |
fa40a8 |
--- src/testdir/test_autocmd_option.in 2015-09-29 18:03:38.704496393 +0200
|
|
Karsten Hopp |
fa40a8 |
***************
|
|
Karsten Hopp |
fa40a8 |
*** 59,72 ****
|
|
Karsten Hopp |
fa40a8 |
:call setbufvar(1, '&l:bk', 1)
|
|
Karsten Hopp |
fa40a8 |
: "should trigger, use correct option name
|
|
Karsten Hopp |
fa40a8 |
:call setbufvar(1, '&backup', 1)
|
|
Karsten Hopp |
fa40a8 |
:" Write register now, because next test shouldn't output anything.
|
|
Karsten Hopp |
fa40a8 |
:$put r
|
|
Karsten Hopp |
fa40a8 |
:let @r=''
|
|
Karsten Hopp |
fa40a8 |
! :let g:testcase="\n14: Setting key option, shouldn't trigger\n"
|
|
Karsten Hopp |
fa40a8 |
:let g:options=[['key', 'invalid', 'invalid1', 'invalid']]
|
|
Karsten Hopp |
fa40a8 |
:setlocal key=blah
|
|
Karsten Hopp |
fa40a8 |
:setlocal key=
|
|
Karsten Hopp |
fa40a8 |
:$put =g:testcase
|
|
Karsten Hopp |
fa40a8 |
:/^dummy text/,$w! test.out
|
|
Karsten Hopp |
fa40a8 |
:qa!
|
|
Karsten Hopp |
fa40a8 |
ENDTEST
|
|
Karsten Hopp |
fa40a8 |
--- 59,76 ----
|
|
Karsten Hopp |
fa40a8 |
:call setbufvar(1, '&l:bk', 1)
|
|
Karsten Hopp |
fa40a8 |
: "should trigger, use correct option name
|
|
Karsten Hopp |
fa40a8 |
:call setbufvar(1, '&backup', 1)
|
|
Karsten Hopp |
fa40a8 |
+ :let g:testcase="14: Setting number option using setwinvar\n"
|
|
Karsten Hopp |
fa40a8 |
+ :let g:options=[['number', 0, 1, 'local']]
|
|
Karsten Hopp |
fa40a8 |
+ :call setwinvar(0, '&number', 1)
|
|
Karsten Hopp |
fa40a8 |
:" Write register now, because next test shouldn't output anything.
|
|
Karsten Hopp |
fa40a8 |
:$put r
|
|
Karsten Hopp |
fa40a8 |
:let @r=''
|
|
Karsten Hopp |
fa40a8 |
! :let g:testcase="\n15: Setting key option, shouldn't trigger\n"
|
|
Karsten Hopp |
fa40a8 |
:let g:options=[['key', 'invalid', 'invalid1', 'invalid']]
|
|
Karsten Hopp |
fa40a8 |
:setlocal key=blah
|
|
Karsten Hopp |
fa40a8 |
:setlocal key=
|
|
Karsten Hopp |
fa40a8 |
:$put =g:testcase
|
|
Karsten Hopp |
fa40a8 |
+ :$put r
|
|
Karsten Hopp |
fa40a8 |
:/^dummy text/,$w! test.out
|
|
Karsten Hopp |
fa40a8 |
:qa!
|
|
Karsten Hopp |
fa40a8 |
ENDTEST
|
|
Karsten Hopp |
fa40a8 |
*** ../vim-7.4.888/src/testdir/test_autocmd_option.ok 2015-07-21 10:57:35.379311166 +0200
|
|
Karsten Hopp |
fa40a8 |
--- src/testdir/test_autocmd_option.ok 2015-09-29 18:03:38.704496393 +0200
|
|
Karsten Hopp |
fa40a8 |
***************
|
|
Karsten Hopp |
fa40a8 |
*** 56,59 ****
|
|
Karsten Hopp |
fa40a8 |
Expected: Name: <backup>, Oldval: <>, NewVal: <1>, Scope: <local>
|
|
Karsten Hopp |
fa40a8 |
Autocmd Option: <backup>, OldVal: <0>, NewVal: <1>, Scope: <local>
|
|
Karsten Hopp |
fa40a8 |
|
|
Karsten Hopp |
fa40a8 |
! 14: Setting key option, shouldn't trigger
|
|
Karsten Hopp |
fa40a8 |
--- 56,64 ----
|
|
Karsten Hopp |
fa40a8 |
Expected: Name: <backup>, Oldval: <>, NewVal: <1>, Scope: <local>
|
|
Karsten Hopp |
fa40a8 |
Autocmd Option: <backup>, OldVal: <0>, NewVal: <1>, Scope: <local>
|
|
Karsten Hopp |
fa40a8 |
|
|
Karsten Hopp |
fa40a8 |
! 14: Setting number option using setwinvar
|
|
Karsten Hopp |
fa40a8 |
! Expected: Name: <number>, Oldval: <0>, NewVal: <1>, Scope: <local>
|
|
Karsten Hopp |
fa40a8 |
! Autocmd Option: <number>, OldVal: <0>, NewVal: <1>, Scope: <local>
|
|
Karsten Hopp |
fa40a8 |
!
|
|
Karsten Hopp |
fa40a8 |
! 15: Setting key option, shouldn't trigger
|
|
Karsten Hopp |
fa40a8 |
!
|
|
Karsten Hopp |
fa40a8 |
*** ../vim-7.4.888/src/version.c 2015-09-29 16:53:18.200480733 +0200
|
|
Karsten Hopp |
fa40a8 |
--- src/version.c 2015-09-29 18:08:21.341560463 +0200
|
|
Karsten Hopp |
fa40a8 |
***************
|
|
Karsten Hopp |
fa40a8 |
*** 743,744 ****
|
|
Karsten Hopp |
fa40a8 |
--- 743,746 ----
|
|
Karsten Hopp |
fa40a8 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
fa40a8 |
+ /**/
|
|
Karsten Hopp |
fa40a8 |
+ 889,
|
|
Karsten Hopp |
fa40a8 |
/**/
|
|
Karsten Hopp |
fa40a8 |
|
|
Karsten Hopp |
fa40a8 |
--
|
|
Karsten Hopp |
fa40a8 |
For a moment, nothing happened.
|
|
Karsten Hopp |
fa40a8 |
Then, after a second or so, nothing continued to happen.
|
|
Karsten Hopp |
fa40a8 |
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
|
|
Karsten Hopp |
fa40a8 |
|
|
Karsten Hopp |
fa40a8 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
fa40a8 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
fa40a8 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
fa40a8 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|