summaryrefslogtreecommitdiff
path: root/test/handler/test_dartanalyzer_handler.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-18 23:57:33 +0100
committerw0rp <devw0rp@gmail.com>2017-07-18 23:57:33 +0100
commit235fc90e226ccc0430b9faa0cd3a226d9be6f31c (patch)
tree173aa89218f03254c5ccb6e80a5ee6139bd21132 /test/handler/test_dartanalyzer_handler.vader
parentaa94d0902a557bc8d65b51a868cf1e122edd2306 (diff)
downloadale-235fc90e226ccc0430b9faa0cd3a226d9be6f31c.zip
Fix #308 - Check Dart files with dartanalyzer
Diffstat (limited to 'test/handler/test_dartanalyzer_handler.vader')
-rw-r--r--test/handler/test_dartanalyzer_handler.vader28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/handler/test_dartanalyzer_handler.vader b/test/handler/test_dartanalyzer_handler.vader
new file mode 100644
index 00000000..954850c5
--- /dev/null
+++ b/test/handler/test_dartanalyzer_handler.vader
@@ -0,0 +1,28 @@
+Before:
+ runtime ale_linters/dart/dartanalyzer.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#dartanalyzer#Handle(bufnr(''), [
+ \ 'Analyzing main.dart...',
+ \ ' error • Expected to find ''}'' at main.dart:5:1 • expected_token',
+ \ ' warning • A value of type ''String'' can''t be assigned to a variable of type ''int'' at main.dart:2:16 • invalid_assignment',
+ \ '1 error and 1 warning found.',
+ \ ])