From 221aceb6db48bf6dd848b96432079a629aeeff59 Mon Sep 17 00:00:00 2001 From: Tim Lagnese Date: Mon, 1 Jul 2019 20:49:12 -0400 Subject: Add gnatpp fixer for Ada --- test/ada_files/testfile.adb | 0 test/fixers/test_gnatpp_fixer_callback.vader | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 test/ada_files/testfile.adb create mode 100644 test/fixers/test_gnatpp_fixer_callback.vader (limited to 'test') diff --git a/test/ada_files/testfile.adb b/test/ada_files/testfile.adb new file mode 100644 index 00000000..e69de29b diff --git a/test/fixers/test_gnatpp_fixer_callback.vader b/test/fixers/test_gnatpp_fixer_callback.vader new file mode 100644 index 00000000..a2bf898e --- /dev/null +++ b/test/fixers/test_gnatpp_fixer_callback.vader @@ -0,0 +1,28 @@ +Before: + call ale#assert#SetUpFixerTest('ada', 'gnatpp') + +After: + " Reset fixers, variables, etc. + " + " Vader's 'Restore' command will be called here. + call ale#assert#TearDownFixerTest() + +Execute(The default command should be correct): + call ale#test#SetFilename('../ada_files/testfile.adb') + + AssertFixer + \ { + \ 'command': ale#Escape(g:ale_ada_gnatpp_executable) .' %t', + \ 'read_temporary_file': 1, + \ } + +Execute(The version check should be correct): + call ale#test#SetFilename('../ada_files/testfile.adb') + let g:ale_ada_gnatpp_options = '--no-alignment' + + AssertFixer + \ { + \ 'command': ale#Escape(g:ale_ada_gnatpp_executable) + \ . ' --no-alignment %t', + \ 'read_temporary_file': 1, + \ } -- cgit v1.2.3