view src/testdir/test_autochdir.vim @ 15024:3a3c9b638187 v8.1.0523

patch 8.1.0523: opening window from quickfix leaves empty buffer behind commit https://github.com/vim/vim/commit/b244373becbec124bee20dbbfd05365586cda8cd Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 11 22:50:27 2018 +0100 patch 8.1.0523: opening window from quickfix leaves empty buffer behind Problem: Opening window from quickfix leaves empty buffer behind. Solution: Add qf_jump_newwin(). (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/2574)
author Bram Moolenaar <Bram@vim.org>
date Sun, 11 Nov 2018 23:00: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