mirror of
https://github.com/neovim/neovim.git
synced 2026-04-26 17:24:18 +00:00
Use "CheckFunction" for standard error message for missing "test_autochdir()". Sync test_autochdir.vim to the latest Vim commit because porting Vim patches for this file modify other files and are too tedious to port.
22 lines
438 B
VimL
22 lines
438 B
VimL
" Test 'autochdir' behavior
|
|
|
|
source check.vim
|
|
CheckOption autochdir
|
|
|
|
func Test_set_filename()
|
|
CheckFunction test_autochdir
|
|
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
|
|
|
|
" vim: shiftwidth=2 sts=2 expandtab
|