mirror of
https://github.com/dense-analysis/ale
synced 2024-12-22 06:10:07 +00:00
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)
|
||||
\ },
|
||||
\ 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(''))
|
||||
|
0
test/test_cpp_project/dummy.cpp
Normal file
0
test/test_cpp_project/dummy.cpp
Normal file
Loading…
Reference in New Issue
Block a user