]> granicus.if.org Git - vim/commitdiff
patch 7.4.889 v7.4.889
authorBram Moolenaar <Bram@vim.org>
Tue, 29 Sep 2015 16:08:33 +0000 (18:08 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 29 Sep 2015 16:08:33 +0000 (18:08 +0200)
Problem:    Triggering OptionSet from setwinvar() isn't tested.
Solution:   Add a test. (Christian Brabandt)

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

index 1ccfe8c51c69bd4d61fe6092b79ad1745d5aa916..1e43d4b02cd2db6a4dd0dcf772453ae128a0c84f 100644 (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
index e98c651c9ecf6bcab75366fa05a0b82803e8c777..2c0e1898fcfa784b97bf146b0347a206d609f95b 100644 (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
+
index 32c4d14d036451dd3e59f7cbc8818f328af8aaf0..d3ea2d3ce7a9ea88b7ccd22397adf5c8218cb47d 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    889,
 /**/
     888,
 /**/