mirror of
https://github.com/neovim/neovim.git
synced 2026-04-24 00:05:36 +00:00
We have a ported Lua version, but we should also keep the Vim version around to make merging easier.
20 lines
371 B
VimL
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
|