2017-08-02 17:34:09 -04:00
|
|
|
Before:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#SetUpLinterTest('php', 'langserver')
|
2017-08-02 17:34:09 -04:00
|
|
|
|
|
|
|
After:
|
|
|
|
if isdirectory(g:dir . '/.git')
|
|
|
|
call delete(g:dir . '/.git', 'd')
|
|
|
|
endif
|
|
|
|
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-08-02 17:34:09 -04:00
|
|
|
|
|
|
|
Execute(The default executable path should be correct):
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLinter 'php-language-server.php',
|
|
|
|
\ 'php ' . ale#Escape('php-language-server.php')
|
2017-08-02 17:34:09 -04:00
|
|
|
|
|
|
|
Execute(Vendor executables should be detected):
|
|
|
|
call ale#test#SetFilename('php-langserver-project/test.php')
|
|
|
|
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLinter
|
2017-12-19 13:23:09 -05:00
|
|
|
\ ale#path#Simplify(g:dir . '/php-langserver-project/vendor/bin/php-language-server.php'),
|
|
|
|
\ 'php ' . ale#Escape(ale#path#Simplify(
|
2017-08-02 17:34:09 -04:00
|
|
|
\ g:dir
|
|
|
|
\ . '/php-langserver-project/vendor/bin/php-language-server.php'
|
2018-07-15 13:24:53 -04:00
|
|
|
\ ))
|
2017-08-02 17:34:09 -04:00
|
|
|
|
|
|
|
Execute(The project path should be correct for .git directories):
|
|
|
|
call ale#test#SetFilename('php-langserver-project/test.php')
|
|
|
|
call mkdir(g:dir . '/.git')
|
|
|
|
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLSPProject g:dir
|