1
0
forked from aniani/vim
Files
vim/src/testdir/test_findfile.vim
Bram Moolenaar dc9a081712 patch 8.0.0359: 'number' and 'relativenumber' are not properly tested
Problem:    'number' and 'relativenumber' are not properly tested.
Solution:   Add tests, change old style to new style tests. (Ozaki Kiichi,
            closes #1447)
2017-02-23 18:46:50 +01:00

26 lines
599 B
VimL

" 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