summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortamago324 <tamago_pad@yahoo.co.jp>2019-11-07 02:44:56 +0900
committertamago324 <tamago_pad@yahoo.co.jp>2019-11-07 02:44:56 +0900
commitdfbb387cc7c754d75ecd0dede0635e39ce9ff028 (patch)
tree790c5a97ff75472288668170e035f8cc2a9b228b /test
parent2d9380d75c5c27a3241925d24ab3be8977a43207 (diff)
downloadale-dfbb387cc7c754d75ecd0dede0635e39ce9ff028.zip
Add nimcheck end_col options
nimcheck
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_nim_handler.vader35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/handler/test_nim_handler.vader b/test/handler/test_nim_handler.vader
index e484000e..b6784d84 100644
--- a/test/handler/test_nim_handler.vader
+++ b/test/handler/test_nim_handler.vader
@@ -21,6 +21,7 @@ Execute(Parsing nim errors should work):
\ 'col': 2,
\ 'text': 'identifier expected, but found ''a.barfoo''',
\ 'type': 'E',
+ \ 'end_col': 9,
\ },
\ {
\ 'lnum': 2,
@@ -28,6 +29,7 @@ Execute(Parsing nim errors should work):
\ 'text': '''NotUsed'' is declared but not used',
\ 'code': 'XDeclaredButNotUsed',
\ 'type': 'W',
+ \ 'end_col': 11,
\ },
\ {
\ 'lnum': 12,
@@ -35,6 +37,35 @@ Execute(Parsing nim errors should work):
\ 'text': 'with : character',
\ 'type': 'E',
\ },
+ \ {
+ \ 'lnum': 1,
+ \ 'col': 8,
+ \ 'text': 'imported and not used: ''strutils''',
+ \ 'code': 'UnusedImport',
+ \ 'type': 'W',
+ \ 'end_col': 15,
+ \ },
+ \ {
+ \ 'lnum': 12,
+ \ 'col': 9,
+ \ 'text': 'undeclared identifier: ''total''',
+ \ 'type': 'E',
+ \ 'end_col': 13,
+ \ },
+ \ {
+ \ 'lnum': 14,
+ \ 'col': 1,
+ \ 'text': '''sum'' cannot be assigned to',
+ \ 'type': 'E',
+ \ 'end_col': 3,
+ \ },
+ \ {
+ \ 'lnum': 15,
+ \ 'col': 1,
+ \ 'text': 'redefinition of ''getName''; previous declaration here: /nested/folder/foobar.nim(14, 6)',
+ \ 'type': 'E',
+ \ 'end_col': 7,
+ \ },
\ ],
\ ale_linters#nim#nimcheck#Handle(bufnr(''), [
\ 'Line with wrong( format)',
@@ -42,4 +73,8 @@ Execute(Parsing nim errors should work):
\ '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]',
\ 'foobar.nim(12, 2) Error: with : character',
+ \ 'foobar.nim(1, 8) Warning: imported and not used: ''strutils'' [UnusedImport]',
+ \ 'foobar.nim(12, 9) Error: undeclared identifier: ''total''',
+ \ 'foobar.nim(14, 1) Error: ''sum'' cannot be assigned to',
+ \ 'foobar.nim(15, 1) Error: redefinition of ''getName''; previous declaration here: /nested/folder/foobar.nim(14, 6)',
\ ])