summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Sierra DiazGranados <davidsierradz@gmail.com>2017-11-05 13:53:12 -0500
committerw0rp <w0rp@users.noreply.github.com>2017-11-05 18:53:12 +0000
commit7086586b1776d2b5f3bf87a7f0c25595a5d7e1b0 (patch)
tree6291c26a2c6529864ae80444b1d360bb9e7b4cf5 /test
parent7b5108d934d8682490ab3d9af25361e06a3df3f8 (diff)
downloadale-7086586b1776d2b5f3bf87a7f0c25595a5d7e1b0.zip
Add executable option for phpmd linter (resolves #1076) (#1078)
* Add executable option for phpmd linter (resolves #1076) * Add test for phpmd executable option
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_phpmd_command_callbacks.vader20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/command_callback/test_phpmd_command_callbacks.vader b/test/command_callback/test_phpmd_command_callbacks.vader
new file mode 100644
index 00000000..928b9771
--- /dev/null
+++ b/test/command_callback/test_phpmd_command_callbacks.vader
@@ -0,0 +1,20 @@
+Before:
+ Save g:ale_php_phpmd_executable
+
+ unlet! g:ale_php_phpmd_executable
+
+ runtime ale_linters/php/phpmd.vim
+
+After:
+ Restore
+
+ call ale#linter#Reset()
+
+Execute(Custom executables should be used for the executable and command):
+ let g:ale_php_phpmd_executable = 'phpmd_test'
+
+ AssertEqual 'phpmd_test', ale_linters#php#phpmd#GetExecutable(bufnr(''))
+ AssertEqual
+ \ ale#Escape('phpmd_test')
+ \ . ' %s text cleancode,codesize,controversial,design,naming,unusedcode --ignore-violations-on-exit %t',
+ \ ale_linters#php#phpmd#GetCommand(bufnr(''))