1
0
forked from aniani/vim
Files
vim/src/testdir/test_autochdir.vim
Bram Moolenaar cf1ba35fc2 patch 8.0.1224: still interference between test functions
Problem:    Still interference between test functions.
Solution:   Clear autocommands. Wipe all buffers.  Fix tests that depend on a
            specific start context.
2017-10-27 00:55:04 +02:00

20 lines
371 B
VimL

" 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