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:
|
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):
|
2019-03-25 17:29:34 -04: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 17:34:09 -04:00
|
|
|
|
2019-03-25 17:29:34 -04:00
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/php-langserver-project/with-composer')
|