diff options
author | Horacio Sanson <hsanson@gmail.com> | 2021-01-13 23:54:06 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 23:54:06 +0900 |
commit | 97ce2423b04745d5c7588385ddbd75be9ef846d4 (patch) | |
tree | 57268e48efdc93900cb41bb2194e1128b6d26c0e /test/handler/test_inko_handler.vader | |
parent | 7b187af10abd2f8984e1ca061c30244a8a0bdb60 (diff) | |
parent | 8375ee2766c4d69462b8c883ddf76d58a86891e4 (diff) | |
download | ale-97ce2423b04745d5c7588385ddbd75be9ef846d4.zip |
Merge pull request #3494 from YorickPeterse/master
Add linter for Inko
Diffstat (limited to 'test/handler/test_inko_handler.vader')
-rw-r--r-- | test/handler/test_inko_handler.vader | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/test/handler/test_inko_handler.vader b/test/handler/test_inko_handler.vader new file mode 100644 index 00000000..6621d2d6 --- /dev/null +++ b/test/handler/test_inko_handler.vader @@ -0,0 +1,54 @@ +Before: + runtime ale_linters/inko/inko.vim + +After: + call ale#linter#Reset() + +Execute(The inko handler should parse errors correctly): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify('/tmp/foo.inko'), + \ 'lnum': 4, + \ 'col': 5, + \ 'text': 'this is an error', + \ 'type': 'E', + \ } + \ ], + \ ale#handlers#inko#Handle(bufnr(''), [ + \ '[', + \ ' {', + \ ' "file": "/tmp/foo.inko",', + \ ' "line": 4,', + \ ' "column": 5,', + \ ' "message": "this is an error",', + \ ' "level": "error"', + \ ' }', + \ ']' + \ ]) + +Execute(The inko handler should parse warnings correctly): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify('/tmp/foo.inko'), + \ 'lnum': 4, + \ 'col': 5, + \ 'text': 'this is a warning', + \ 'type': 'W', + \ } + \ ], + \ ale#handlers#inko#Handle(bufnr(''), [ + \ '[', + \ ' {', + \ ' "file": "/tmp/foo.inko",', + \ ' "line": 4,', + \ ' "column": 5,', + \ ' "message": "this is a warning",', + \ ' "level": "warning"', + \ ' }', + \ ']' + \ ]) + +Execute(The inko handler should handle empty output): + AssertEqual [], ale#handlers#inko#Handle(bufnr(''), []) |