view src/testdir/test_autochdir.vim @ 14319:f7e80dbb4f00 v8.1.0175

patch 8.1.0175: marks test fails in very wide window commit https://github.com/vim/vim/commit/bde14d8e24f6b8ca409290733dbf11cb6fee5751 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 10 15:22:32 2018 +0200 patch 8.1.0175: marks test fails in very wide window Problem: Marks test fails in very wide window. (Vladimir Lomov) Solution: Extend the text to match 'columns'. (closes https://github.com/vim/vim/issues/3180, closes https://github.com/vim/vim/issues/3181)
author Christian Brabandt <cb@256bit.org>
date Tue, 10 Jul 2018 15:30:07 +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