This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/handler/test_nim_handler.vader

39 lines
1.1 KiB
Text
Raw Normal View History

2017-03-18 16:33:26 +00:00
Execute(Parsing nim errors should work):
runtime ale_linters/nim/nimcheck.vim
2017-05-06 22:06:51 +00:00
silent file foobar.nim
2017-03-18 16:33:26 +00:00
AssertEqual
\ [
\ {
\ 'lnum': 8,
\ 'col': 8,
\ 'text': 'Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
\ 'type': 'W',
\ },
\ {
\ 'lnum': 12,
\ 'col': 2,
\ 'text': 'Error: identifier expected, but found ''a.barfoo''',
\ 'type': 'E',
\ },
\ {
\ 'lnum': 2,
\ 'col': 5,
\ 'text': 'Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
\ 'type': 'W',
\ },
\ {
\ 'lnum': 12,
\ 'col': 2,
\ 'text': 'Error: with : character',
\ 'type': 'E',
\ },
2017-03-18 16:33:26 +00:00
\ ],
2017-05-06 22:06:51 +00:00
\ ale_linters#nim#nimcheck#Handle(bufnr(''), [
2017-03-18 16:33:26 +00:00
\ '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]',
\ 'foobar.nim(12, 2) Error: with : character',
2017-03-18 16:33:26 +00:00
\ ])