summaryrefslogtreecommitdiff
path: root/src/testdir/test_autochdir.vim
blob: f52e2e668a8e4e770af6d071399c27587356c425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
" Test 'autochdir' behavior

if !exists("+autochdir")
  finish
endif

func Test_set_filename()
  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
  call delete('samples/Xtest')
endfunc