view src/testdir/test_autochdir.vim @ 19647:c8cb1a41f64c v8.2.0380

patch 8.2.0380: tiny popup when creating a terminal popup without minwidth Commit: https://github.com/vim/vim/commit/193982650960f8411df51f3b3b0d44a75e1ac034 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 14 15:28:08 2020 +0100 patch 8.2.0380: tiny popup when creating a terminal popup without minwidth Problem: Tiny popup when creating a terminal popup without minwidth. Solution: Use a default mininum size of 5 lines of 20 characters.
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 Mar 2020 15:30:03 +0100
parents 26a04a556982
children 08940efa6b4e
line wrap: on
line source

" Test 'autochdir' behavior

source check.vim
CheckOption autochdir

func Test_set_filename()
  let cwd = getcwd()
  call test_autochdir()
  set acd

  let s:li = []
  autocmd DirChanged auto call add(s:li, "autocd")
  autocmd DirChanged auto call add(s:li, expand("<afile>"))

  new
  w samples/Xtest
  call assert_equal("Xtest", expand('%'))
  call assert_equal("samples", substitute(getcwd(), '.*/\(\k*\)', '\1', ''))
  call assert_equal(["autocd", getcwd()], s:li)

  bwipe!
  au! DirChanged
  set noacd
  call chdir(cwd)
  call delete('samples/Xtest')
endfunc