view src/testdir/test_autochdir.vim @ 10464:ce8ef728a12e v8.0.0125

commit https://github.com/vim/vim/commit/eaaa9bbda6ec0a8589a9b23720f95bffe01dc267 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 9 18:42:20 2016 +0100 patch 8.0.0125 Problem: Not enough testing for entering Ex commands. Solution: Add test for CTRL-\ e {expr}. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Fri, 09 Dec 2016 18:45:04 +0100
parents 38e2fc4ee4ef
children 03a6aeea2096
line wrap: on
line source

" 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