summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorghsang <66662835+ghsang@users.noreply.github.com>2021-07-25 13:48:12 +0900
committerGitHub <noreply@github.com>2021-07-25 13:48:12 +0900
commit73d32335fe0b9d723e19f098d3c263b01e17d234 (patch)
tree00939ac8aaf01fcfbd077e649e79aa12efc8822a /test
parent8c591996a83d623fb158fe090acbd89dabbfaf06 (diff)
downloadale-73d32335fe0b9d723e19f098d3c263b01e17d234.zip
Add support for `dart analyze` (#3825)
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_dart_analyze_handler.vader28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/handler/test_dart_analyze_handler.vader b/test/handler/test_dart_analyze_handler.vader
new file mode 100644
index 00000000..b3f20fb8
--- /dev/null
+++ b/test/handler/test_dart_analyze_handler.vader
@@ -0,0 +1,28 @@
+Before:
+ runtime ale_linters/dart/dart_analyze.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(Basic problems should be parsed correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'type': 'E',
+ \ 'text': 'expected_token: Expected to find ''}''',
+ \ 'lnum': 5,
+ \ 'col': 1,
+ \ },
+ \ {
+ \ 'type': 'W',
+ \ 'text': 'invalid_assignment: A value of type ''String'' can''t be assigned to a variable of type ''int''',
+ \ 'lnum': 2,
+ \ 'col': 16,
+ \ },
+ \ ],
+ \ ale_linters#dart#dart_analyze#Handle(bufnr(''), [
+ \ 'Analyzing main.dart...',
+ \ ' error - main.dart:5:1 - Expected to find ''}'' - expected_token',
+ \ ' warning - main.dart:2:16 - A value of type ''String'' can''t be assigned to a variable of type ''int'' - invalid_assignment',
+ \ '1 error and 1 warning found.',
+ \ ])