comparison src/testdir/test_autocmd_option.in @ 6943:d37e168dee20 v7.4.790

patch 7.4.790 Problem: Test fails when the autochdir feature is not available. Test output contains the test script. Solution: Check for the autochdir feature. (Kazunobu Kuriyama) Only write the relevant test output.
author Bram Moolenaar <bram@vim.org>
date Tue, 21 Jul 2015 10:57:44 +0200
parents 4db70c94226b
children 0b4e65cf84fb
comparison
equal deleted inserted replaced
6942:758fe8fd4bae 6943:d37e168dee20
1 Test for option autocommand 1 Test for option autocommand
2 2
3 STARTTEST 3 STARTTEST
4 :so small.vim 4 :so small.vim
5 :if !has("eval") || !has("autocmd") | e! test.ok | w! test.out | qa! | endif 5 :if !has("eval") || !has("autocmd") || !exists("+autochdir") | e! test.ok | w! test.out | qa! | endif
6 :fu! AutoCommand(match) 6 :fu! AutoCommand(match)
7 : let c=g:testcase 7 : let c=g:testcase
8 : let item=remove(g:options, 0) 8 : let item=remove(g:options, 0)
9 : let c.=printf("Expected: Name: <%s>, Oldval: <%s>, NewVal: <%s>, Scope: <%s>\n", item[0], item[1], item[2], item[3]) 9 : let c.=printf("Expected: Name: <%s>, Oldval: <%s>, NewVal: <%s>, Scope: <%s>\n", item[0], item[1], item[2], item[3])
10 : let c.=printf("Autocmd Option: <%s>,", a:match) 10 : let c.=printf("Autocmd Option: <%s>,", a:match)
65 :let g:testcase="\n14: Setting key option, shouldn't trigger\n" 65 :let g:testcase="\n14: Setting key option, shouldn't trigger\n"
66 :let g:options=[['key', 'invalid', 'invalid1', 'invalid']] 66 :let g:options=[['key', 'invalid', 'invalid1', 'invalid']]
67 :setlocal key=blah 67 :setlocal key=blah
68 :setlocal key= 68 :setlocal key=
69 :$put =g:testcase 69 :$put =g:testcase
70 :%w! test.out 70 :/^dummy text/,$w! test.out
71 :qa! 71 :qa!
72 ENDTEST 72 ENDTEST
73 dummy text 73 dummy text