forked from aniani/vim
Problem: 'number' and 'relativenumber' are not properly tested.
Solution: Add tests, change old style to new style tests. (Ozaki Kiichi,
closes #1447)
26 lines
599 B
VimL
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
|