Add tests for the yamllint handler

This commit is contained in:
w0rp 2018-07-01 12:50:46 +01:00
parent cd8dd099d8
commit fee5107d43
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
1 changed files with 26 additions and 0 deletions

View File

@ -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>''',
\ ])