Make the test C import path test fail less

This commit is contained in:
w0rp
2018-07-23 22:03:28 +01:00
parent d9579dbbe9
commit 2a861dfd40
2 changed files with 21 additions and 31 deletions

View File

@@ -4,8 +4,11 @@
call ale#Set('c_parse_makefile', 0)
let s:sep = has('win32') ? '\' : '/'
" Set just so tests can override it.
let g:__ale_c_project_filenames = ['.git/HEAD', 'configure', 'Makefile', 'CMakeLists.txt']
function! ale#c#FindProjectRoot(buffer) abort
for l:project_filename in ['.git/HEAD', 'configure', 'Makefile', 'CMakeLists.txt']
for l:project_filename in g:__ale_c_project_filenames
let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename)
if !empty(l:full_path)