summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarkus Doits <doits@users.noreply.github.com>2017-03-14 00:21:59 +0100
committerw0rp <w0rp@users.noreply.github.com>2017-03-13 23:21:59 +0000
commitfae26369d415a14ce10739513c7f78273993a827 (patch)
tree243a2c8f46a02365e7e1f1d1f36267e1e4144656 /test
parent3f3d8b001470979864af7317075f38779bc46518 (diff)
downloadale-fae26369d415a14ce10739513c7f78273993a827.zip
add slim-lint (#388)
* add slim-lint * add slim readme entry * add slim entry to doc * add slimlint vader test
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_slim_handler.vader34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/handler/test_slim_handler.vader b/test/handler/test_slim_handler.vader
new file mode 100644
index 00000000..12bd8183
--- /dev/null
+++ b/test/handler/test_slim_handler.vader
@@ -0,0 +1,34 @@
+" Author: Markus Doits <markus.doits@googlemail.com>
+
+Execute(The slim handler should parse lines correctly):
+ runtime ale_linters/slim/slimlint.vim
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 1,
+ \ 'text': 'RedundantDiv: `div` is redundant when class attribute shortcut is present',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 2,
+ \ 'text': 'LineLength: Line is too long. [136/80]',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 3,
+ \ 'text': 'Invalid syntax',
+ \ 'type': 'E',
+ \ },
+ \ ],
+ \ ale_linters#slim#slimlint#Handle(347, [
+ \ 'inv.slim:1 [W] RedundantDiv: `div` is redundant when class attribute shortcut is present',
+ \ 'inv.slim:2 [W] LineLength: Line is too long. [136/80]',
+ \ 'inv.slim:3 [E] Invalid syntax',
+ \ ])
+
+After:
+ call ale#linter#Reset()