summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
authorNathaniel Williams <nat@livewatch.com>2017-10-26 19:32:33 +0100
committerw0rp <devw0rp@gmail.com>2017-10-26 19:37:04 +0100
commite4456a4e0e9622baf2af30acd34a28963df5f4fa (patch)
tree5ae24057300cbcafa576f6ca81903168133f6659 /test/command_callback
parent6ed456f99c46ad6853fdd893344e94060ce9f6c3 (diff)
downloadale-e4456a4e0e9622baf2af30acd34a28963df5f4fa.zip
Add tflint fot Terraform
Diffstat (limited to 'test/command_callback')
-rw-r--r--test/command_callback/test_terraform_tflint_command_callback.vader32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/command_callback/test_terraform_tflint_command_callback.vader b/test/command_callback/test_terraform_tflint_command_callback.vader
new file mode 100644
index 00000000..ba768152
--- /dev/null
+++ b/test/command_callback/test_terraform_tflint_command_callback.vader
@@ -0,0 +1,32 @@
+Before:
+
+ Save g:ale_terraform_tflint_executable
+ Save g:ale_terraform_tflint_options
+
+ runtime ale_linters/terraform/tflint.vim
+
+
+After:
+ Restore
+ call ale#linter#Reset()
+
+
+Execute(The default executable should be configurable):
+ AssertEqual 'tflint', ale_linters#terraform#tflint#GetExecutable(bufnr(''))
+
+ let g:ale_terraform_tflint_executable = 'asdf'
+
+ AssertEqual 'asdf', ale_linters#terraform#tflint#GetExecutable(bufnr(''))
+
+Execute(The default command should be good):
+ let g:ale_terraform_tflint_executable = 'tflint'
+ AssertEqual
+ \ ale#Escape('tflint') . ' -f json',
+ \ ale_linters#terraform#tflint#GetCommand(bufnr(''))
+
+Execute(Overriding things should work):
+ let g:ale_terraform_tflint_executable = 'fnord'
+ let g:ale_terraform_tflint_options = '--whatever'
+ AssertEqual
+ \ ale#Escape('fnord') . ' --whatever -f json',
+ \ ale_linters#terraform#tflint#GetCommand(bufnr(''))