blob: d071f4b3259cfa2e296eba18e3907585313a3c8e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
" 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
|