From fecffeee91eb4670810d314ac5f97b2d776a675c Mon Sep 17 00:00:00 2001 From: jhlink Date: Fri, 10 Jul 2020 18:26:15 -0400 Subject: test: Add astyle vader test --- test/fixers/test_astyle_fixer_callback.vader | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/fixers/test_astyle_fixer_callback.vader diff --git a/test/fixers/test_astyle_fixer_callback.vader b/test/fixers/test_astyle_fixer_callback.vader new file mode 100644 index 00000000..2fc57ad0 --- /dev/null +++ b/test/fixers/test_astyle_fixer_callback.vader @@ -0,0 +1,23 @@ +Before: + Save g:ale_c_astyle_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_c_astyle_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The astyle callback should return the correct default values): + call ale#test#SetFilename('../c_files/testfile.c') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' %t', + \ }, + \ ale#fixers#astyle#Fix(bufnr('')) -- cgit v1.2.3