summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbaabelfish <baabelfish@gmail.com>2017-03-18 18:33:26 +0200
committerbaabelfish <baabelfish@gmail.com>2017-03-18 19:45:37 +0200
commit297bc8553c33211e706e6b82fe819e69710d7d8b (patch)
tree56a4c672cd3f8c9feae04a788e3cb9f079371f6e /test
parente7d32fe37677636a0be087163c1efa7d0ba10d47 (diff)
downloadale-297bc8553c33211e706e6b82fe819e69710d7d8b.zip
Add support for nim check
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_nim_handler.vader33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/handler/test_nim_handler.vader b/test/handler/test_nim_handler.vader
new file mode 100644
index 00000000..d3ff8f86
--- /dev/null
+++ b/test/handler/test_nim_handler.vader
@@ -0,0 +1,33 @@
+Execute(Parsing nim errors should work):
+ runtime ale_linters/nim/nimcheck.vim
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'bufnr': 42,
+ \ 'lnum': 8,
+ \ 'col': 8,
+ \ 'text': 'Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'bufnr': 42,
+ \ 'lnum': 12,
+ \ 'col': 2,
+ \ 'text': 'Error: identifier expected, but found ''a.barfoo''',
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'bufnr': 42,
+ \ 'lnum': 2,
+ \ 'col': 5,
+ \ 'text': 'Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
+ \ 'type': 'W',
+ \ },
+ \ ],
+ \ ale_linters#nim#nimcheck#Handle(42, [
+ \ 'Line with wrong( format)',
+ \ 'foobar.nim(8, 8) Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
+ \ 'foobar.nim(12, 2) Error: identifier expected, but found ''a.barfoo''',
+ \ '/nested/folder/foobar.nim(2, 5) Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
+ \ ])