summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTim Lagnese <timlag1305@gmail.com>2019-07-01 20:49:12 -0400
committerTim Lagnese <timlag1305@gmail.com>2019-07-01 20:50:02 -0400
commit221aceb6db48bf6dd848b96432079a629aeeff59 (patch)
tree0c18fb822ebcd8f8a1d641aad299fb6a12ce0ae6 /test
parent6feeca793ad7df7e947defac7a9c0f8b70972a0f (diff)
downloadale-221aceb6db48bf6dd848b96432079a629aeeff59.zip
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,
+ \ }