summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorix5 <ix5@users.noreply.github.com>2018-10-18 10:19:27 +0200
committerw0rp <w0rp@users.noreply.github.com>2018-10-18 09:19:27 +0100
commitb8359c1114229737563bde4e2478ca2309ce6e7a (patch)
tree8a1c4ec9f95f259872143d449440d93222797f8f /test
parent3b38a83ae9c221e0f4589f087bfb6b43056e3943 (diff)
downloadale-b8359c1114229737563bde4e2478ca2309ce6e7a.zip
Allow custom executable for ansible linters (#1977)
* Allow custom executable for ansible linters * Add ansible-lint tests * ansible-lint: simplify linter command * Rename linter "ansible" to "ansible_lint" * Add ansible-lint options to documentation * Add alias ansible-lint for ansible_lint
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_ansible_lint_command_callback.vader17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/command_callback/test_ansible_lint_command_callback.vader b/test/command_callback/test_ansible_lint_command_callback.vader
new file mode 100644
index 00000000..ddc6c6c8
--- /dev/null
+++ b/test/command_callback/test_ansible_lint_command_callback.vader
@@ -0,0 +1,17 @@
+Before:
+ call ale#assert#SetUpLinterTest('ansible', 'ansible_lint')
+ let b:bin_dir = has('win32') ? 'Scripts' : 'bin'
+
+After:
+ unlet! b:bin_dir
+ unlet! b:executable
+ call ale#assert#TearDownLinterTest()
+
+Execute(The ansible_lint command callback should return default string):
+ AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' -p %t'
+
+Execute(The ansible_lint executable should be configurable):
+ let g:ale_ansible_ansible_lint_executable = '~/.local/bin/ansible-lint'
+
+ AssertLinter '~/.local/bin/ansible-lint',
+ \ ale#Escape('~/.local/bin/ansible-lint') . ' -p %t'