X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/linter/test_psalm.vader diff --git a/.vim/bundle/ale/test/linter/test_psalm.vader b/.vim/bundle/ale/test/linter/test_psalm.vader new file mode 100644 index 00000000..94e718d4 --- /dev/null +++ b/.vim/bundle/ale/test/linter/test_psalm.vader @@ -0,0 +1,44 @@ +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' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'psalm', + \ ale#Escape('psalm') + \ . ' --language-server --my-user-provided-option my-value' + +Execute(The project path should be correct for composer.json file): + call ale#test#SetFilename('../test-files/php/with-composer/test.php') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer')