diff options
author | Horacio Sanson <hsanson@gmail.com> | 2021-01-23 01:24:24 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-23 01:24:24 +0900 |
commit | 9a1e91e075abf386e8c6fd620ec0835e566a7db1 (patch) | |
tree | e99b0e0c77e24b4544b3bca59426d765242825df /test/handler | |
parent | 64550062dc46a15772a23b471e3eede6f80c6ca7 (diff) | |
parent | 6b0b8cec79d6805f57ff925923d7157ffb119a5a (diff) | |
download | ale-9a1e91e075abf386e8c6fd620ec0835e566a7db1.zip |
Merge pull request #3519 from atsuya/feature/support-vala-lint
Add support for Vala-Lint
Diffstat (limited to 'test/handler')
-rw-r--r-- | test/handler/test_vala_lint_handler.vader | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/test/handler/test_vala_lint_handler.vader b/test/handler/test_vala_lint_handler.vader new file mode 100644 index 00000000..b8a4fbfa --- /dev/null +++ b/test/handler/test_vala_lint_handler.vader @@ -0,0 +1,54 @@ +Before: + runtime ale_linters/vala/vala_lint.vim + +After: + call ale#linter#Reset() + +Execute(The Vala-Lint handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 18, + \ 'col': 18, + \ 'text': 'Expected space before paren', + \ 'code': 'space-before-paren', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 64, + \ 'col': 37, + \ 'text': 'Expected space before paren', + \ 'code': 'space-before-paren', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 73, + \ 'col': 37, + \ 'text': 'Expected space before paren', + \ 'code': 'space-before-paren', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#vala#vala_lint#Handle(bufnr(''), [ + \ 'Application.vala', + \ ' 18.18 error Expected space before paren space-before-paren', + \ ' 64.37 warn Expected space before paren space-before-paren', + \ ' 73.37 error Expected space before paren space-before-paren', + \ ]) + +Execute(The Vala-Lint handler should ignore unknown error types): + AssertEqual + \ [ + \ { + \ 'lnum': 73, + \ 'col': 37, + \ 'text': 'Expected space before paren', + \ 'code': 'space-before-paren', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#vala#vala_lint#Handle(bufnr(''), [ + \ 'Application.vala', + \ ' 18.18 test Expected space before paren space-before-paren', + \ ' 73.37 error Expected space before paren space-before-paren', + \ ]) |