view src/testdir/test_autochdir.vim @ 12742:af961e38e508 v8.0.1249

patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression commit https://github.com/vim/vim/commit/c20e0d52071a3f6e12321ec3344024faa4695da9 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 2 18:19:19 2017 +0100 patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression Problem: No error when WaitFor() gets an invalid wrong expression. Solution: Do not ignore errors in evaluationg the expression. Fix places where the expression was wrong.
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Nov 2017 18:30:05 +0100
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