mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-19 01:22:57 +08:00
Fix #3247 - Use --always-make for make -n by default
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
Before:
|
||||
Save g:ale_c_parse_makefile
|
||||
Save g:ale_c_always_make
|
||||
Save b:ale_c_always_make
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test')
|
||||
|
||||
let g:ale_c_parse_makefile = 1
|
||||
let g:ale_c_always_make = 1
|
||||
let b:ale_c_always_make = 1
|
||||
|
||||
function SplitAndParse(path_prefix, command) abort
|
||||
let l:args = ale#c#ShellSplit(a:command)
|
||||
@@ -18,6 +22,22 @@ After:
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The make command should be correct):
|
||||
call ale#test#SetFilename('test_c_projects/makefile_project/subdir/file.c')
|
||||
|
||||
AssertEqual
|
||||
\ ale#path#CdString(ale#path#Simplify(g:dir. '/test_c_projects/makefile_project'))
|
||||
\ . 'make -n --always-make',
|
||||
\ ale#c#GetMakeCommand(bufnr(''))
|
||||
|
||||
" You should be able to disable --always-make for a buffer.
|
||||
let b:ale_c_always_make = 0
|
||||
|
||||
AssertEqual
|
||||
\ ale#path#CdString(ale#path#Simplify(g:dir. '/test_c_projects/makefile_project'))
|
||||
\ . 'make -n',
|
||||
\ ale#c#GetMakeCommand(bufnr(''))
|
||||
|
||||
Execute(The CFlags parser should be able to parse include directives):
|
||||
call ale#test#SetFilename('test_c_projects/makefile_project/subdir/file.c')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user