forked from aniani/vim
Problem: No statistics displayed after running tests. Solution: Summarize the test results. (Christian Brabandt, closes #4391) Also make it possible to report a skipped file.
28 lines
602 B
VimL
28 lines
602 B
VimL
" Test 'autochdir' behavior
|
|
|
|
if !exists("+autochdir")
|
|
throw 'Skipped: autochdir feature missing'
|
|
endif
|
|
|
|
func Test_set_filename()
|
|
let cwd = getcwd()
|
|
call test_autochdir()
|
|
set acd
|
|
|
|
let s:li = []
|
|
autocmd DirChanged auto call add(s:li, "autocd")
|
|
autocmd DirChanged auto call add(s:li, expand("<afile>"))
|
|
|
|
new
|
|
w samples/Xtest
|
|
call assert_equal("Xtest", expand('%'))
|
|
call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', ''))
|
|
call assert_equal(["autocd", getcwd()], s:li)
|
|
|
|
bwipe!
|
|
au! DirChanged
|
|
set noacd
|
|
exe 'cd ' . cwd
|
|
call delete('samples/Xtest')
|
|
endfunc
|