mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 21:24:33 +08:00
test: Find .astylerc placed with src for astyle
This commit is contained in:
@@ -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(''))
|
||||||
|
|||||||
0
test/test_cpp_project/dummy.cpp
Normal file
0
test/test_cpp_project/dummy.cpp
Normal file
Reference in New Issue
Block a user