view src/testdir/test_autochdir.vim @ 14379:0f1446193ded v8.1.0204

patch 8.1.0204: inputlist() is not tested commit https://github.com/vim/vim/commit/947b39e761b8a95cc1bd37ad0c2c30552238809a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 22 19:36:37 2018 +0200 patch 8.1.0204: inputlist() is not tested Problem: inputlist() is not tested. Solution: Add a test. (Dominique Pelle, closes https://github.com/vim/vim/issues/3240)
author Christian Brabandt <cb@256bit.org>
date Sun, 22 Jul 2018 19:45:05 +0200
parents 03a6aeea2096
children 90ab2d3ce11d
line wrap: on
line source

" 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