summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorAtsuya Takagi <asoftonight@gmail.com>2021-01-04 16:45:12 +0900
committerAtsuya Takagi <asoftonight@gmail.com>2021-01-23 00:08:01 +0900
commit2dbf4ee271600a7e243a6d475c57bf54958e904e (patch)
tree1d7fb3b3658219eae515f6a0e80deddcddbb4c76 /test/handler
parent67c3fa9001c28ea19e1ac09bd733680fb8df4c24 (diff)
downloadale-2dbf4ee271600a7e243a6d475c57bf54958e904e.zip
add test to check if it properly ignores outputs with unknown error types
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_vala_lint_handler.vader21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/handler/test_vala_lint_handler.vader b/test/handler/test_vala_lint_handler.vader
index cee8674a..b8a4fbfa 100644
--- a/test/handler/test_vala_lint_handler.vader
+++ b/test/handler/test_vala_lint_handler.vader
@@ -19,7 +19,7 @@ Execute(The Vala-Lint handler should parse lines correctly):
\ 'col': 37,
\ 'text': 'Expected space before paren',
\ 'code': 'space-before-paren',
- \ 'type': 'E',
+ \ 'type': 'W',
\ },
\ {
\ 'lnum': 73,
@@ -32,6 +32,23 @@ Execute(The Vala-Lint handler should parse lines correctly):
\ ale_linters#vala#vala_lint#Handle(bufnr(''), [
\ 'Application.vala',
\ ' 18.18 error Expected space before paren space-before-paren',
- \ ' 64.37 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',
\ ])