view src/testdir/test_findfile.vim @ 14276:752ef53d3731 v8.1.0154

patch 8.1.0154: crash with "set smarttab shiftwidth=0 softtabstop=-1" commit https://github.com/vim/vim/commit/c9fe5ab3b093803b6e8d03358ba16aca6b6f0db1 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 5 22:27:08 2018 +0200 patch 8.1.0154: crash with "set smarttab shiftwidth=0 softtabstop=-1" Problem: Crash with "set smarttab shiftwidth=0 softtabstop=-1". Solution: Fall back to using 'tabstop'. (closes https://github.com/vim/vim/issues/3155)
author Christian Brabandt <cb@256bit.org>
date Thu, 05 Jul 2018 22:30:06 +0200
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