view src/testdir/test_autochdir.vim @ 14459:ecf6c05d8ac3 v8.1.0243

patch 8.1.0243: using :term ++close ++hidden closes a window commit https://github.com/vim/vim/commit/5db7eec42337f0eecdc332f582eecf37278044e8 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 7 16:33:18 2018 +0200 patch 8.1.0243: using :term ++close ++hidden closes a window Problem: Using :term ++close ++hidden closes a window. (Marcin Szamotulski) Solution: Don't close the window if only using it temporarily for unloading the terminal buffer. (closes #3287)
author Christian Brabandt <cb@256bit.org>
date Tue, 07 Aug 2018 16: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