summaryrefslogtreecommitdiff
path: root/test/test_nearest_file_search.vader
blob: c59bfce26744eec9a9e4841e57df19d830c52369 (plain)
1
2
3
4
5
6
7
8
9
10
11
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')