ale/test/handler/test_markdownlint_handler.v...

78 lines
2.1 KiB
Plaintext
Raw Normal View History

2018-03-04 00:32:32 +00:00
Before:
runtime ale_linters/markdown/markdownlint.vim
After:
call ale#linter#Reset()
Execute(The Markdownlint handler should parse pre v0.19.0 output with single digit line correctly):
2018-03-04 00:32:32 +00:00
AssertEqual
\ [
\ {
\ 'lnum': 1,
\ 'code': 'MD013/line-length',
\ 'text': 'Line length [Expected: 80; Actual: 114]',
2018-03-04 00:32:32 +00:00
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#markdownlint#Handle(0, [
\ 'README.md: 1: MD013/line-length Line length [Expected: 80; Actual: 114]'
\ ])
Execute(The Markdownlint handler should parse pre v0.19.0 output with multi digit line correctly):
AssertEqual
\ [
\ {
\ 'lnum': 100,
\ 'code': 'MD013/line-length',
\ 'text': 'Line length [Expected: 80; Actual: 114]',
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#markdownlint#Handle(0, [
\ 'README.md: 100: MD013/line-length Line length [Expected: 80; Actual: 114]'
\ ])
Execute(The Markdownlint handler should parse post v0.19.0 output with single digit line correctly):
AssertEqual
\ [
\ {
\ 'lnum': 1,
\ 'code': 'MD013/line-length',
\ 'text': 'Line length [Expected: 80; Actual: 114]',
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#markdownlint#Handle(0, [
\ 'README.md:1 MD013/line-length Line length [Expected: 80; Actual: 114]'
\ ])
Execute(The Markdownlint handler should parse post v0.19.0 output with multi digit line correctly):
AssertEqual
\ [
\ {
\ 'lnum': 100,
\ 'code': 'MD013/line-length',
\ 'text': 'Line length [Expected: 80; Actual: 114]',
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#markdownlint#Handle(0, [
\ 'README.md:100 MD013/line-length Line length [Expected: 80; Actual: 114]'
\ ])
Execute(The Markdownlint handler should parse post v0.22.0 output with column correctly):
AssertEqual
\ [
2018-03-04 00:32:32 +00:00
\ {
\ 'lnum': 10,
\ 'col': 20,
\ 'code': 'MD013/line-length',
\ 'text': 'Line length [Expected: 80; Actual: 114]',
2018-03-04 00:32:32 +00:00
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#markdownlint#Handle(0, [
\ 'README.md:10:20 MD013/line-length Line length [Expected: 80; Actual: 114]'
2018-03-04 00:32:32 +00:00
\ ])