test: Add cpp test case for astyle

This commit is contained in:
jhlink 2020-07-25 21:25:11 -04:00
parent b3ad7bb3d0
commit a9799fe90e
1 changed files with 13 additions and 0 deletions

View File

@ -21,3 +21,16 @@ Execute(The astyle callback should return the correct default values):
\ . ' %t',
\ },
\ ale#fixers#astyle#Fix(bufnr(''))
Execute(The astyle callback should support cpp files):
call ale#test#SetFilename('../cpp_files/dummy.cpp')
let g:ale_cpp_astyle_executable = 'xxxinvalid'
set filetype=cpp " The test fails without this
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('xxxinvalid')
\ . ' %t',
\ },
\ ale#fixers#astyle#Fix(bufnr(''))