diff 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
line wrap: on
line diff
--- a/src/testdir/test_autocmd_option.in
+++ b/src/testdir/test_autocmd_option.in
@@ -2,7 +2,7 @@ Test for option autocommand
 
 STARTTEST
 :so small.vim
-:if !has("eval") || !has("autocmd") | e! test.ok | w! test.out | qa! | endif
+:if !has("eval") || !has("autocmd") || !exists("+autochdir") | e! test.ok | w! test.out | qa! | endif
 :fu! AutoCommand(match)
 :	let c=g:testcase
 :       let item=remove(g:options, 0)
@@ -67,7 +67,7 @@ STARTTEST
 :setlocal key=blah
 :setlocal key=
 :$put =g:testcase
-:%w! test.out
+:/^dummy text/,$w! test.out
 :qa!
 ENDTEST
 dummy text