This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/test_nearest_file_search.vader

11 lines
438 B
Text

Execute(Open a file some directory down):
silent! cd /testplugin/test
:e! top/middle/bottom/dummy.txt
Then(We should be able to find a configuration file further up):
AssertEqual expand('%:p:h:h:h:h') . '/top/example.ini', ale#util#FindNearestFile(bufnr('%'), 'example.ini')
Execute(Do nothing):
Then(We shouldn't find anything for files which don't match):
AssertEqual '', ale#util#FindNearestFile(bufnr('%'), 'cantfindthis')