install.fairie/dotfiles/.vim/plugged/ale/test/handler/test_markdownlint_handler.vader
Git E2E Dev Test Username e149692cc9 git subrepo clone https://github.com/dense-analysis/ale.git ./dotfiles/.vim/plugged/ale
subrepo:
  subdir:   "dotfiles/.vim/plugged/ale"
  merged:   "e4b205440"
upstream:
  origin:   "https://github.com/dense-analysis/ale.git"
  branch:   "master"
  commit:   "e4b205440"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:37:09 -04:00

91 lines
2.7 KiB
Text

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):
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 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
\ [
\ {
\ 'lnum': 10,
\ 'col': 20,
\ 'code': 'MD013/line-length',
\ 'text': 'Line length [Expected: 80; Actual: 114]',
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#markdownlint#Handle(0, [
\ 'README.md:10:20 MD013/line-length Line length [Expected: 80; Actual: 114]'
\ ])
Execute(The Markdownlint handler should parse output with multiple slashes in rule name correctly):
AssertEqual
\ [
\ {
\ 'lnum': 10,
\ 'code': 'MD022/blanks-around-headings/blanks-around-headers',
\ 'text': 'Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "### something"]',
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#markdownlint#Handle(0, [
\ 'README.md:10 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "### something"]'
\ ])