diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-01 12:50:46 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-01 12:50:46 +0100 |
commit | fee5107d435a0dd647efd3682eef0c37ef804fa0 (patch) | |
tree | d886213e014aac009e60984a0db619bb11a413a7 /test/handler | |
parent | cd8dd099d877b3435d0cf878694d45d521a46f0a (diff) | |
download | ale-fee5107d435a0dd647efd3682eef0c37ef804fa0.zip |
Add tests for the yamllint handler
Diffstat (limited to 'test/handler')
-rw-r--r-- | test/handler/test_yamllint_handler.vader | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/handler/test_yamllint_handler.vader b/test/handler/test_yamllint_handler.vader new file mode 100644 index 00000000..b1c4ad4f --- /dev/null +++ b/test/handler/test_yamllint_handler.vader @@ -0,0 +1,26 @@ +Before: + runtime! ale_linters/yaml/yamllint.vim + +After: + call ale#linter#Reset() + +Execute: + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'missing document start "---" (document-start)', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'syntax error: expected the node content, but found ''<stream end>''', + \ }, + \ ], + \ ale_linters#yaml#yamllint#Handle(bufnr(''), [ + \ 'something.yaml:1:1: [warning] missing document start "---" (document-start)', + \ 'something.yml:2:1: [error] syntax error: expected the node content, but found ''<stream end>''', + \ ]) |