mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-24 10:38:34 +08:00
#3633 - Move linter tests into test/linter
This commit is contained in:
38
test/linter/test_psalm.vader
Normal file
38
test/linter/test_psalm.vader
Normal file
@@ -0,0 +1,38 @@
|
||||
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
|
||||
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default executable path should be correct):
|
||||
AssertLinter 'psalm',
|
||||
\ ale#Escape('psalm') . ' --language-server'
|
||||
|
||||
Execute(Vendor executables should be detected):
|
||||
call ale#test#SetFilename('../test-files/psalm/test.php')
|
||||
|
||||
AssertLinter
|
||||
\ ale#path#Simplify(g:dir . '/../test-files/psalm/vendor/bin/psalm'),
|
||||
\ ale#Escape(ale#path#Simplify(
|
||||
\ g:dir
|
||||
\ . '/../test-files/psalm/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_php_psalm_options = '--my-user-provided-option my-value'
|
||||
|
||||
AssertLinter 'psalm',
|
||||
\ ale#Escape('psalm')
|
||||
\ . ' --language-server --my-user-provided-option my-value'
|
||||
Reference in New Issue
Block a user