2016-10-17 20:14:34 +00:00
|
|
|
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):
|
2017-04-17 22:29:02 +00:00
|
|
|
AssertEqual expand('%:p:h:h:h:h') . '/top/example.ini', ale#path#FindNearestFile(bufnr('%'), 'example.ini')
|
2016-10-17 20:14:34 +00:00
|
|
|
|
|
|
|
Execute(Do nothing):
|
|
|
|
|
|
|
|
Then(We shouldn't find anything for files which don't match):
|
2017-04-17 22:29:02 +00:00
|
|
|
AssertEqual '', ale#path#FindNearestFile(bufnr('%'), 'cantfindthis')
|