summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-07-16 15:06:55 +0100
committerGitHub <noreply@github.com>2017-07-16 15:06:55 +0100
commitbd5ff5b1e52723c910f083bb4b37bad6a410900d (patch)
tree5af64ed202016f484517cd3c76f83dbead40cfc7 /test
parent7d174b00561f2cb6a6ad71b839b1b6fc6bd88e3b (diff)
parent1aea6a34ff22c9e79d20a018b4d46000c208caf2 (diff)
downloadale-bd5ff5b1e52723c910f083bb4b37bad6a410900d.zip
Merge pull request #774 from dmitrivereshchagin/syntaxerl-linter
Add SyntaxErl linter
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_syntaxerl_handler.vader24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/handler/test_syntaxerl_handler.vader b/test/handler/test_syntaxerl_handler.vader
new file mode 100644
index 00000000..1308ec84
--- /dev/null
+++ b/test/handler/test_syntaxerl_handler.vader
@@ -0,0 +1,24 @@
+Before:
+ runtime ale_linters/erlang/syntaxerl.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute:
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 42,
+ \ 'text': "syntax error before: ','",
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'lnum': 42,
+ \ 'text': 'function foo/0 is unused',
+ \ 'type': 'W',
+ \ },
+ \ ],
+ \ ale_linters#erlang#syntaxerl#Handle(42, [
+ \ "/tmp/v2wDixk/1/module.erl:42: syntax error before: ','",
+ \ '/tmp/v2wDixk/2/module.erl:42: warning: function foo/0 is unused',
+ \ ])