mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
cebf31cf70
commit
a1ee06a099
19
src/nvim/testdir/test_autochdir.vim
Normal file
19
src/nvim/testdir/test_autochdir.vim
Normal 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
|
Loading…
Reference in New Issue
Block a user