2017-08-02 21:34:09 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('php', 'langserver')
|
2017-08-02 21:34:09 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-08-02 21:34:09 +00:00
|
|
|
|
|
|
|
Execute(The default executable path should be correct):
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'php-language-server.php',
|
|
|
|
\ 'php ' . ale#Escape('php-language-server.php')
|
2017-08-02 21:34:09 +00:00
|
|
|
|
|
|
|
Execute(Vendor executables should be detected):
|
|
|
|
call ale#test#SetFilename('php-langserver-project/test.php')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter
|
2017-12-19 18:23:09 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/php-langserver-project/vendor/bin/php-language-server.php'),
|
|
|
|
\ 'php ' . ale#Escape(ale#path#Simplify(
|
2017-08-02 21:34:09 +00:00
|
|
|
\ g:dir
|
|
|
|
\ . '/php-langserver-project/vendor/bin/php-language-server.php'
|
2018-07-15 17:24:53 +00:00
|
|
|
\ ))
|
2017-08-02 21:34:09 +00:00
|
|
|
|
|
|
|
Execute(The project path should be correct for .git directories):
|
2019-03-25 21:29:34 +00:00
|
|
|
call ale#test#SetFilename('php-langserver-project/with-git/test.php')
|
|
|
|
silent! call mkdir('php-langserver-project/with-git/.git')
|
|
|
|
|
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/php-langserver-project/with-git')
|
|
|
|
|
|
|
|
Execute(The project path should be correct for composer.json file):
|
|
|
|
call ale#test#SetFilename('php-langserver-project/with-composer/test.php')
|
2017-08-02 21:34:09 +00:00
|
|
|
|
2019-03-25 21:29:34 +00:00
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/php-langserver-project/with-composer')
|