From a9799fe90e95468ce4d176206e3a59dd7f881fa7 Mon Sep 17 00:00:00 2001 From: jhlink Date: Sat, 25 Jul 2020 21:25:11 -0400 Subject: test: Add cpp test case for astyle --- test/fixers/test_astyle_fixer_callback.vader | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') diff --git a/test/fixers/test_astyle_fixer_callback.vader b/test/fixers/test_astyle_fixer_callback.vader index 2fc57ad0..9eb52788 100644 --- a/test/fixers/test_astyle_fixer_callback.vader +++ b/test/fixers/test_astyle_fixer_callback.vader @@ -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('')) -- cgit v1.2.3