|
Karsten Hopp |
e633f1 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
e633f1 |
Subject: Patch 7.4.790
|
|
Karsten Hopp |
e633f1 |
Fcc: outbox
|
|
Karsten Hopp |
e633f1 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
e633f1 |
Mime-Version: 1.0
|
|
Karsten Hopp |
e633f1 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
e633f1 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
e633f1 |
------------
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
Patch 7.4.790 (after 7.4.786)
|
|
Karsten Hopp |
e633f1 |
Problem: Test fails when the autochdir feature is not available. Test
|
|
Karsten Hopp |
e633f1 |
output contains the test script.
|
|
Karsten Hopp |
e633f1 |
Solution: Check for the autochdir feature. (Kazunobu Kuriyama) Only write
|
|
Karsten Hopp |
e633f1 |
the relevant test output.
|
|
Karsten Hopp |
e633f1 |
Files: src/testdir/test_autocmd_option.in,
|
|
Karsten Hopp |
e633f1 |
src/testdir/test_autocmd_option.ok
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
*** ../vim-7.4.789/src/testdir/test_autocmd_option.in 2015-07-17 17:38:00.567399623 +0200
|
|
Karsten Hopp |
e633f1 |
--- src/testdir/test_autocmd_option.in 2015-07-21 10:51:40.170669685 +0200
|
|
Karsten Hopp |
e633f1 |
***************
|
|
Karsten Hopp |
e633f1 |
*** 2,8 ****
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
STARTTEST
|
|
Karsten Hopp |
e633f1 |
:so small.vim
|
|
Karsten Hopp |
e633f1 |
! :if !has("eval") || !has("autocmd") | e! test.ok | w! test.out | qa! | endif
|
|
Karsten Hopp |
e633f1 |
:fu! AutoCommand(match)
|
|
Karsten Hopp |
e633f1 |
: let c=g:testcase
|
|
Karsten Hopp |
e633f1 |
: let item=remove(g:options, 0)
|
|
Karsten Hopp |
e633f1 |
--- 2,8 ----
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
STARTTEST
|
|
Karsten Hopp |
e633f1 |
:so small.vim
|
|
Karsten Hopp |
e633f1 |
! :if !has("eval") || !has("autocmd") || !exists("+autochdir") | e! test.ok | w! test.out | qa! | endif
|
|
Karsten Hopp |
e633f1 |
:fu! AutoCommand(match)
|
|
Karsten Hopp |
e633f1 |
: let c=g:testcase
|
|
Karsten Hopp |
e633f1 |
: let item=remove(g:options, 0)
|
|
Karsten Hopp |
e633f1 |
***************
|
|
Karsten Hopp |
e633f1 |
*** 67,73 ****
|
|
Karsten Hopp |
e633f1 |
:setlocal key=blah
|
|
Karsten Hopp |
e633f1 |
:setlocal key=
|
|
Karsten Hopp |
e633f1 |
:$put =g:testcase
|
|
Karsten Hopp |
e633f1 |
! :%w! test.out
|
|
Karsten Hopp |
e633f1 |
:qa!
|
|
Karsten Hopp |
e633f1 |
ENDTEST
|
|
Karsten Hopp |
e633f1 |
dummy text
|
|
Karsten Hopp |
e633f1 |
--- 67,73 ----
|
|
Karsten Hopp |
e633f1 |
:setlocal key=blah
|
|
Karsten Hopp |
e633f1 |
:setlocal key=
|
|
Karsten Hopp |
e633f1 |
:$put =g:testcase
|
|
Karsten Hopp |
e633f1 |
! :/^dummy text/,$w! test.out
|
|
Karsten Hopp |
e633f1 |
:qa!
|
|
Karsten Hopp |
e633f1 |
ENDTEST
|
|
Karsten Hopp |
e633f1 |
dummy text
|
|
Karsten Hopp |
e633f1 |
*** ../vim-7.4.789/src/testdir/test_autocmd_option.ok 2015-07-17 17:38:00.567399623 +0200
|
|
Karsten Hopp |
e633f1 |
--- src/testdir/test_autocmd_option.ok 2015-07-21 10:51:19.962860786 +0200
|
|
Karsten Hopp |
e633f1 |
***************
|
|
Karsten Hopp |
e633f1 |
*** 1,75 ****
|
|
Karsten Hopp |
e633f1 |
- Test for option autocommand
|
|
Karsten Hopp |
e633f1 |
-
|
|
Karsten Hopp |
e633f1 |
- STARTTEST
|
|
Karsten Hopp |
e633f1 |
- :so small.vim
|
|
Karsten Hopp |
e633f1 |
- :if !has("eval") || !has("autocmd") | e! test.ok | w! test.out | qa! | endif
|
|
Karsten Hopp |
e633f1 |
- :fu! AutoCommand(match)
|
|
Karsten Hopp |
e633f1 |
- : let c=g:testcase
|
|
Karsten Hopp |
e633f1 |
- : let item=remove(g:options, 0)
|
|
Karsten Hopp |
e633f1 |
- : let c.=printf("Expected: Name: <%s>, Oldval: <%s>, NewVal: <%s>, Scope: <%s>\n", item[0], item[1], item[2], item[3])
|
|
Karsten Hopp |
e633f1 |
- : let c.=printf("Autocmd Option: <%s>,", a:match)
|
|
Karsten Hopp |
e633f1 |
- : let c.=printf(" OldVal: <%s>,", v:option_old)
|
|
Karsten Hopp |
e633f1 |
- : let c.=printf(" NewVal: <%s>,", v:option_new)
|
|
Karsten Hopp |
e633f1 |
- : let c.=printf(" Scope: <%s>\n", v:option_type)
|
|
Karsten Hopp |
e633f1 |
- : call setreg('r', printf("%s\n%s", getreg('r'), c))
|
|
Karsten Hopp |
e633f1 |
- :endfu
|
|
Karsten Hopp |
e633f1 |
- :au OptionSet * :call AutoCommand(expand("<amatch>"))
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="1: Setting number option\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['number', 0, 1, 'global']]
|
|
Karsten Hopp |
e633f1 |
- :set nu
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="2: Setting local number option\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['number', 1, 0, 'local']]
|
|
Karsten Hopp |
e633f1 |
- :setlocal nonu
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="3: Setting global number option\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['number', 1, 0, 'global']]
|
|
Karsten Hopp |
e633f1 |
- :setglobal nonu
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="4: Setting local autoindent option\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['autoindent', 0, 1, 'local']]
|
|
Karsten Hopp |
e633f1 |
- :setlocal ai
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="5: Setting global autoindent option\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['autoindent', 0, 1, 'global']]
|
|
Karsten Hopp |
e633f1 |
- :setglobal ai
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="6: Setting global autoindent option\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['autoindent', 1, 0, 'global']]
|
|
Karsten Hopp |
e633f1 |
- :set ai!
|
|
Karsten Hopp |
e633f1 |
- : Should not print anything, use :noa
|
|
Karsten Hopp |
e633f1 |
- :noa :set nonu
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="7: Setting several global list and number option\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['list', 0, 1, 'global'], ['number', 0, 1, 'global']]
|
|
Karsten Hopp |
e633f1 |
- :set list nu
|
|
Karsten Hopp |
e633f1 |
- :noa set nolist nonu
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="8: Setting global acd\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['autochdir', 0, 1, 'global']]
|
|
Karsten Hopp |
e633f1 |
- :setlocal acd
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="9: Setting global autoread\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['autoread', 0, 1, 'global']]
|
|
Karsten Hopp |
e633f1 |
- :set ar
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="10: Setting local autoread\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['autoread', 0, 1, 'local']]
|
|
Karsten Hopp |
e633f1 |
- :setlocal ar
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="11: Setting global autoread\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['autoread', 1, 0, 'global']]
|
|
Karsten Hopp |
e633f1 |
- :setglobal invar
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="12: Setting option backspace through :let\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['backspace', '', 'eol,indent,start', 'global']]
|
|
Karsten Hopp |
e633f1 |
- :let &bs="eol,indent,start"
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="13: Setting option backspace through setbufvar()\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['backup', '', '1', 'local']]
|
|
Karsten Hopp |
e633f1 |
- : "try twice, first time, shouldn't trigger because option name is invalid, second time, it should trigger
|
|
Karsten Hopp |
e633f1 |
- :call setbufvar(1, '&l:bk', 1)
|
|
Karsten Hopp |
e633f1 |
- : "should trigger, use correct option name
|
|
Karsten Hopp |
e633f1 |
- :call setbufvar(1, '&backup', 1)
|
|
Karsten Hopp |
e633f1 |
- :" Write register now, because next test shouldn't output anything.
|
|
Karsten Hopp |
e633f1 |
- :$put r
|
|
Karsten Hopp |
e633f1 |
- :let @r=''
|
|
Karsten Hopp |
e633f1 |
- :let g:testcase="\n14: Setting key option, shouldn't trigger\n"
|
|
Karsten Hopp |
e633f1 |
- :let g:options=[['key', 'invalid', 'invalid1', 'invalid']]
|
|
Karsten Hopp |
e633f1 |
- :setlocal key=blah
|
|
Karsten Hopp |
e633f1 |
- :setlocal key=
|
|
Karsten Hopp |
e633f1 |
- :$put =g:testcase
|
|
Karsten Hopp |
e633f1 |
- :%w! test.out
|
|
Karsten Hopp |
e633f1 |
- :qa!
|
|
Karsten Hopp |
e633f1 |
- ENDTEST
|
|
Karsten Hopp |
e633f1 |
dummy text
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
1: Setting number option
|
|
Karsten Hopp |
e633f1 |
--- 1,3 ----
|
|
Karsten Hopp |
e633f1 |
*** ../vim-7.4.789/src/version.c 2015-07-19 14:42:16.573130169 +0200
|
|
Karsten Hopp |
e633f1 |
--- src/version.c 2015-07-21 10:57:00.815637916 +0200
|
|
Karsten Hopp |
e633f1 |
***************
|
|
Karsten Hopp |
e633f1 |
*** 743,744 ****
|
|
Karsten Hopp |
e633f1 |
--- 743,746 ----
|
|
Karsten Hopp |
e633f1 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
e633f1 |
+ /**/
|
|
Karsten Hopp |
e633f1 |
+ 790,
|
|
Karsten Hopp |
e633f1 |
/**/
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
--
|
|
Karsten Hopp |
e633f1 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
e633f1 |
242. You turn down a better-paying job because it doesn't come with
|
|
Karsten Hopp |
e633f1 |
a free e-mail account.
|
|
Karsten Hopp |
e633f1 |
|
|
Karsten Hopp |
e633f1 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
e633f1 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
e633f1 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
e633f1 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|