summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-10-25 15:22:34 +0100
committerGitHub <noreply@github.com>2018-10-25 15:22:34 +0100
commit9bdd5771ef85ca24aeadab80bb1d0976920e9305 (patch)
tree7780e78a361b0ae2d88ee2a7573317484137208e /test/command_callback
parentb3829d043dec7c35870197eec4b50ab7a14ea1bf (diff)
parent7fa0d3dcc47a03c54c4450377ef8053b32e0139a (diff)
downloadale-9bdd5771ef85ca24aeadab80bb1d0976920e9305.zip
Merge pull request #2018 from muglug/patch-1
Update Psalm to use LSP
Diffstat (limited to 'test/command_callback')
-rwxr-xr-xtest/command_callback/psalm-project/vendor/bin/psalm-language-server0
-rw-r--r--test/command_callback/test_psalm_command_callbacks.vader25
2 files changed, 21 insertions, 4 deletions
diff --git a/test/command_callback/psalm-project/vendor/bin/psalm-language-server b/test/command_callback/psalm-project/vendor/bin/psalm-language-server
new file mode 100755
index 00000000..e69de29b
--- /dev/null
+++ b/test/command_callback/psalm-project/vendor/bin/psalm-language-server
diff --git a/test/command_callback/test_psalm_command_callbacks.vader b/test/command_callback/test_psalm_command_callbacks.vader
index 4c31b7b4..d731054f 100644
--- a/test/command_callback/test_psalm_command_callbacks.vader
+++ b/test/command_callback/test_psalm_command_callbacks.vader
@@ -2,11 +2,28 @@ Before:
call ale#assert#SetUpLinterTest('php', 'psalm')
After:
+ if isdirectory(g:dir . '/.git')
+ call delete(g:dir . '/.git', 'd')
+ endif
+
call ale#assert#TearDownLinterTest()
-Execute(Custom executables should be used for the executable and command):
- let g:ale_php_psalm_executable = 'psalm_test'
+Execute(The default executable path should be correct):
+ AssertLinter 'psalm-language-server',
+ \ ale#Escape('psalm-language-server')
+
+Execute(Vendor executables should be detected):
+ call ale#test#SetFilename('psalm-project/test.php')
+
+ AssertLinter
+ \ ale#path#Simplify(g:dir . '/psalm-project/vendor/bin/psalm-language-server'),
+ \ ale#Escape(ale#path#Simplify(
+ \ g:dir
+ \ . '/psalm-project/vendor/bin/psalm-language-server'
+ \ ))
- AssertLinter 'psalm_test',
- \ ale#Escape('psalm_test') . ' --diff --output-format=emacs %s'
+Execute(The project path should be correct for .git directories):
+ call ale#test#SetFilename('psalm-project/test.php')
+ call mkdir(g:dir . '/.git')
+ AssertLSPProject g:dir \ No newline at end of file