view src/testdir/test_findfile.vim @ 13529:f5655d70484f v8.0.1638

patch 8.0.1638: popup test fails depending on environment variable commit https://github.com/vim/vim/commit/e7499ddc33508d3d341e96f84a0e7b95b2d6927c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 24 17:56:13 2018 +0100 patch 8.0.1638: popup test fails depending on environment variable Problem: Popup test fails depending on environment variable. Solution: Reset $COLORFGBG when running Vim in a terminal. (closes https://github.com/vim/vim/issues/2693)
author Christian Brabandt <cb@256bit.org>
date Sat, 24 Mar 2018 18:00:07 +0100
parents a479b7064550
children 977a05589b65
line wrap: on
line source

" Test for findfile()
"
func Test_findfile()
  new
  let cwd=getcwd()
  cd ..

  " Tests may be run from a shadow directory, so an extra cd needs to be done to
  " get above src/
  if fnamemodify(getcwd(), ':t') != 'src'
    cd ../.. 
  else 
    cd .. 
  endif
  set ssl

  call assert_equal('src/testdir/test_findfile.vim', findfile('test_findfile.vim','src/test*'))
  exe "cd" cwd
  cd ..
  call assert_equal('testdir/test_findfile.vim', findfile('test_findfile.vim','test*'))
  call assert_equal('testdir/test_findfile.vim', findfile('test_findfile.vim','testdir'))

  exe "cd" cwd
  q!
endfunc