diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/command_callback/test_psalm_command_callbacks.vader | 12 | ||||
-rw-r--r-- | test/handler/test_php_psalm_handler.vader | 24 |
2 files changed, 36 insertions, 0 deletions
diff --git a/test/command_callback/test_psalm_command_callbacks.vader b/test/command_callback/test_psalm_command_callbacks.vader new file mode 100644 index 00000000..4c31b7b4 --- /dev/null +++ b/test/command_callback/test_psalm_command_callbacks.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'psalm') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Custom executables should be used for the executable and command): + let g:ale_php_psalm_executable = 'psalm_test' + + AssertLinter 'psalm_test', + \ ale#Escape('psalm_test') . ' --diff --output-format=emacs %s' + diff --git a/test/handler/test_php_psalm_handler.vader b/test/handler/test_php_psalm_handler.vader new file mode 100644 index 00000000..fd62a467 --- /dev/null +++ b/test/handler/test_php_psalm_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/php/psalm.vim + +After: + call ale#linter#Reset() + +Execute(The php static analyzer handler should parse errors from psalm): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'W', + \ 'text': 'somewarning', + \ }, + \ { + \ 'lnum': 11, + \ 'type': 'E', + \ 'text': 'someerror', + \ }, + \ ], + \ ale_linters#php#psalm#Handle(347, [ + \ "/file:1:3:warning - somewarning", + \ "/file:11:33:error - someerror", + \ ]) |