summaryrefslogtreecommitdiff
path: root/test/handler/test_credo_handler.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-03-06 23:32:48 +0000
committerw0rp <devw0rp@gmail.com>2017-03-06 23:32:48 +0000
commit663d8f832fb2d59751722dc9f22f5c44dcc84b31 (patch)
tree592f1cf1bf2c8fa67dada4d4062045d9db1f30ab /test/handler/test_credo_handler.vader
parent75a2dc5ff5f1975b1a80b59704ffdfd1902b050f (diff)
downloadale-663d8f832fb2d59751722dc9f22f5c44dcc84b31.zip
Group handler test cases in a directory
Diffstat (limited to 'test/handler/test_credo_handler.vader')
-rw-r--r--test/handler/test_credo_handler.vader29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/handler/test_credo_handler.vader b/test/handler/test_credo_handler.vader
new file mode 100644
index 00000000..73f98ba0
--- /dev/null
+++ b/test/handler/test_credo_handler.vader
@@ -0,0 +1,29 @@
+Execute(The credo handler should parse lines correctly):
+ runtime ale_linters/elixir/credo.vim
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 1,
+ \ 'col': 4,
+ \ 'text': 'There is no whitespace around parentheses/brackets most of the time, but here there is.',
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 26,
+ \ 'col': 0,
+ \ 'text': 'If/else blocks should not have a negated condition in `if`.',
+ \ 'type': 'W',
+ \ },
+ \ ],
+ \ ale_linters#elixir#credo#Handle(347, [
+ \ 'This line should be ignored completely',
+ \ 'lib/filename.ex:1:4: C: There is no whitespace around parentheses/brackets most of the time, but here there is.',
+ \ 'lib/phoenix/channel.ex:26: R: If/else blocks should not have a negated condition in `if`.',
+ \ ])
+
+After:
+ call ale#linter#Reset()
+