0
0
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:
Bram Moolenaar
2015-09-29 18:08:33 +02:00
parent ba117c23df
commit 74b738d414
3 changed files with 13 additions and 2 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
889,
/**/
888,
/**/