Mercurial > vim
view src/testdir/test_findfile.vim @ 13948:2ed1585c6467 v8.0.1844
patch 8.0.1844: superfluous quickfix code, missing examples
commit https://github.com/vim/vim/commit/78ddc06bdd5c59cffdbb61eed7dcb5dcc4a17f19
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue May 15 21:56:34 2018 +0200
patch 8.0.1844: superfluous quickfix code, missing examples
Problem: Superfluous quickfix code, missing examples.
Solution: Remove unneeded code. Add a few examples. Add a bit more
testing. (Yegappan Lakshmanan, closes #2916)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 15 May 2018 22:00:07 +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