summaryrefslogtreecommitdiff
path: root/test/test_resolve_local_path.vader
blob: e269221ed380217397c7ab31514e7b9692342459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Execute(Open a file some directory down):
  silent! cd /testplugin/test
  :e! top/middle/bottom/dummy.txt

Then(We should be able to find the local version of a file):
  AssertEqual
  \ expand('%:p:h:h:h:h') . '/top/example.ini',
  \  ale#util#ResolveLocalPath(bufnr('%'), 'example.ini', '/global/config.ini')

Execute(Do nothing):

Then(We shouldn't find anything for files which don't match):
  AssertEqual
  \ '/global/config.ini',
  \  ale#util#ResolveLocalPath(bufnr('%'), 'missing.ini', '/global/config.ini')