2018-09-27 15:48:47 +00:00
|
|
|
Before:
|
|
|
|
call ale#assert#SetUpLinterTest('php', 'psalm')
|
|
|
|
|
|
|
|
After:
|
2018-10-19 20:31:12 +00:00
|
|
|
if isdirectory(g:dir . '/.git')
|
|
|
|
call delete(g:dir . '/.git', 'd')
|
|
|
|
endif
|
|
|
|
|
2018-09-27 15:48:47 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
|
2018-10-19 20:31:12 +00:00
|
|
|
Execute(The default executable path should be correct):
|
2019-07-25 21:00:49 +00:00
|
|
|
AssertLinter 'psalm',
|
|
|
|
\ ale#Escape('psalm') . ' --language-server'
|
2018-10-19 20:31:12 +00:00
|
|
|
|
|
|
|
Execute(Vendor executables should be detected):
|
|
|
|
call ale#test#SetFilename('psalm-project/test.php')
|
|
|
|
|
|
|
|
AssertLinter
|
2019-07-25 21:00:49 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/psalm-project/vendor/bin/psalm'),
|
2018-10-19 20:31:12 +00:00
|
|
|
\ ale#Escape(ale#path#Simplify(
|
|
|
|
\ g:dir
|
2019-07-25 21:00:49 +00:00
|
|
|
\ . '/psalm-project/vendor/bin/psalm'
|
|
|
|
\ )) . ' --language-server'
|
2018-09-27 15:48:47 +00:00
|
|
|
|
2018-10-19 20:31:12 +00:00
|
|
|
Execute(The project path should be correct for .git directories):
|
|
|
|
call ale#test#SetFilename('psalm-project/test.php')
|
2018-09-27 15:48:47 +00:00
|
|
|
|
2019-03-29 16:09:27 +00:00
|
|
|
if !isdirectory(g:dir . '/.git')
|
|
|
|
call mkdir(g:dir . '/.git')
|
|
|
|
endif
|
|
|
|
|
|
|
|
AssertLSPProject g:dir
|