mirror of https://github.com/dense-analysis/ale
test: Find .astylerc placed with src for astyle
This commit is contained in:
parent
d49b06e030
commit
ab6aed17ab
|
@ -81,3 +81,16 @@ Execute(The astyle callback should find nearest default option file _astylrc):
|
||||||
\ . ' --stdin=' . ale#Escape(targetfile)
|
\ . ' --stdin=' . ale#Escape(targetfile)
|
||||||
\ },
|
\ },
|
||||||
\ ale#fixers#astyle#Fix(bufnr(''))
|
\ ale#fixers#astyle#Fix(bufnr(''))
|
||||||
|
|
||||||
|
Execute(The astyle callback should find .astylrc in the same directory as src):
|
||||||
|
call ale#test#SetFilename('../test_cpp_project/dummy.cpp')
|
||||||
|
set filetype=cpp " The test fails without this
|
||||||
|
let targetfile = bufname(bufnr('%'))
|
||||||
|
|
||||||
|
AssertEqual
|
||||||
|
\ {
|
||||||
|
\ 'command': ale#Escape('invalidpp')
|
||||||
|
\ . ' --project=.astylerc'
|
||||||
|
\ . ' --stdin=' . ale#Escape(targetfile)
|
||||||
|
\ },
|
||||||
|
\ ale#fixers#astyle#Fix(bufnr(''))
|
||||||
|
|
Loading…
Reference in New Issue