test/oldtest: restore test_autochdir.vim

We have a ported Lua version, but we should also keep the Vim version
around to make merging easier.
This commit is contained in:
Justin M. Keyes 2018-02-03 11:54:59 +01:00
parent cebf31cf70
commit a1ee06a099

View File

@ -0,0 +1,19 @@
" Test 'autochdir' behavior
if !exists("+autochdir")
finish
endif
func Test_set_filename()
let cwd = getcwd()
call test_autochdir()
set acd
new
w samples/Xtest
call assert_equal("Xtest", expand('%'))
call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', ''))
bwipe!
set noacd
exe 'cd ' . cwd
call delete('samples/Xtest')
endfunc