summaryrefslogtreecommitdiff
path: root/test/command_callback/test_psalm_command_callbacks.vader
diff options
context:
space:
mode:
authorBartek thindil Jasicki <thindil@laeran.pl>2020-09-04 13:46:11 +0200
committerBartek thindil Jasicki <thindil@laeran.pl>2020-09-04 13:46:11 +0200
commitc78be861035765d268a5533cf583803e22d56d1c (patch)
tree63b2294216911121d594b885ae93fb82edc00273 /test/command_callback/test_psalm_command_callbacks.vader
parent0de847a8e1793b597ba0a73ae8e20797a5fce920 (diff)
parent844febb9fbfb66bb13dd652d958495e47f0bd408 (diff)
downloadale-c78be861035765d268a5533cf583803e22d56d1c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/command_callback/test_psalm_command_callbacks.vader')
-rw-r--r--test/command_callback/test_psalm_command_callbacks.vader32
1 files changed, 26 insertions, 6 deletions
diff --git a/test/command_callback/test_psalm_command_callbacks.vader b/test/command_callback/test_psalm_command_callbacks.vader
index 70b5af95..d32780e6 100644
--- a/test/command_callback/test_psalm_command_callbacks.vader
+++ b/test/command_callback/test_psalm_command_callbacks.vader
@@ -2,6 +2,9 @@ Before:
call ale#assert#SetUpLinterTest('php', 'psalm')
After:
+ unlet! g:i
+ unlet! g:matched
+
if isdirectory(g:dir . '/.git')
call delete(g:dir . '/.git', 'd')
endif
@@ -22,19 +25,36 @@ Execute(Vendor executables should be detected):
\ . '/psalm-project/vendor/bin/psalm'
\ )) . ' --language-server'
+ let g:ale_php_psalm_use_global = 1
+
+ AssertLinter 'psalm',
+ \ ale#Escape('psalm') . ' --language-server'
+
Execute(User provided options should be used):
- let g:ale_psalm_langserver_options = '--my-user-provided-option my-value'
+ let g:ale_php_psalm_options = '--my-user-provided-option my-value'
AssertLinter 'psalm',
\ ale#Escape('psalm')
\ . ' --language-server --my-user-provided-option my-value'
-
Execute(The project path should be correct for .git directories):
call ale#test#SetFilename('psalm-project/test.php')
+ let g:matched = 0
- if !isdirectory(g:dir . '/.git')
- call mkdir(g:dir . '/.git')
- endif
+ for g:i in range(4)
+ if !isdirectory(g:dir . '/.git')
+ call mkdir(g:dir . '/.git')
+ endif
+
+ try
+ AssertLSPProject g:dir
+ catch /.+/
+ endtry
- AssertLSPProject g:dir
+ let g:matched = 1
+ break
+ endfor
+
+ if !g:matched
+ AssertLSPProject g:dir
+ endif