mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.889
Problem: Triggering OptionSet from setwinvar() isn't tested. Solution: Add a test. (Christian Brabandt)
This commit is contained in:
@@ -59,14 +59,18 @@ STARTTEST
|
||||
:call setbufvar(1, '&l:bk', 1)
|
||||
: "should trigger, use correct option name
|
||||
:call setbufvar(1, '&backup', 1)
|
||||
:let g:testcase="14: Setting number option using setwinvar\n"
|
||||
:let g:options=[['number', 0, 1, 'local']]
|
||||
:call setwinvar(0, '&number', 1)
|
||||
:" Write register now, because next test shouldn't output anything.
|
||||
:$put r
|
||||
:let @r=''
|
||||
:let g:testcase="\n14: Setting key option, shouldn't trigger\n"
|
||||
:let g:testcase="\n15: Setting key option, shouldn't trigger\n"
|
||||
:let g:options=[['key', 'invalid', 'invalid1', 'invalid']]
|
||||
:setlocal key=blah
|
||||
:setlocal key=
|
||||
:$put =g:testcase
|
||||
:$put r
|
||||
:/^dummy text/,$w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
@@ -56,4 +56,9 @@ Autocmd Option: <backspace>, OldVal: <>, NewVal: <eol,indent,start>, Scope: <glo
|
||||
Expected: Name: <backup>, Oldval: <>, NewVal: <1>, Scope: <local>
|
||||
Autocmd Option: <backup>, OldVal: <0>, NewVal: <1>, Scope: <local>
|
||||
|
||||
14: Setting key option, shouldn't trigger
|
||||
14: Setting number option using setwinvar
|
||||
Expected: Name: <number>, Oldval: <0>, NewVal: <1>, Scope: <local>
|
||||
Autocmd Option: <number>, OldVal: <0>, NewVal: <1>, Scope: <local>
|
||||
|
||||
15: Setting key option, shouldn't trigger
|
||||
|
||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
889,
|
||||
/**/
|
||||
888,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user