summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2019-08-18 15:37:51 +0100
committerGitHub <noreply@github.com>2019-08-18 15:37:51 +0100
commitddb559b3bed31b81e8189c3caa8074842574f662 (patch)
treec9977af5e3f0213133832df10b977543bbd1957b /test
parentee62cc6898e88a292fc790b049e2ee5454d7b957 (diff)
parent221aceb6db48bf6dd848b96432079a629aeeff59 (diff)
downloadale-ddb559b3bed31b81e8189c3caa8074842574f662.zip
Merge pull request #2631 from timlag1305/feat/ada-gnatpp
Add gnatpp fixer for Ada
Diffstat (limited to 'test')
-rw-r--r--test/ada_files/testfile.adb0
-rw-r--r--test/fixers/test_gnatpp_fixer_callback.vader28
2 files changed, 28 insertions, 0 deletions
diff --git a/test/ada_files/testfile.adb b/test/ada_files/testfile.adb
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/ada_files/testfile.adb
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,
+ \ }