summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorBartek thindil Jasicki <thindil@laeran.pl>2020-07-31 07:56:28 +0200
committerBartek thindil Jasicki <thindil@laeran.pl>2020-07-31 07:56:28 +0200
commit9a9d12cf4f3dda8ab45d38b10d5f3e01efc9b5d6 (patch)
tree1fcb23a7b16d22e397d6d7b52419b060d81d1c22 /test/handler
parente06060a31fbdc58221234e9344023f3372e93629 (diff)
parentfc7b4585e630313560def02806b02e08f84d8f5d (diff)
downloadale-9a9d12cf4f3dda8ab45d38b10d5f3e01efc9b5d6.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_markdownlint_handler.vader67
1 files changed, 60 insertions, 7 deletions
diff --git a/test/handler/test_markdownlint_handler.vader b/test/handler/test_markdownlint_handler.vader
index db6acc66..8e9f77a0 100644
--- a/test/handler/test_markdownlint_handler.vader
+++ b/test/handler/test_markdownlint_handler.vader
@@ -4,21 +4,74 @@ Before:
After:
call ale#linter#Reset()
-Execute(The Markdownlint handler should parse output correctly):
+Execute(The Markdownlint handler should parse pre v0.19.0 output with single digit line correctly):
AssertEqual
\ [
\ {
\ 'lnum': 1,
- \ 'text': '(MD002/first-header-h1) First header should be a top level header [Expected: h1; Actual: h2]',
+ \ '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': 298,
- \ 'text': '(MD033/no-inline-html) Inline HTML [Element: p]',
+ \ 'lnum': 10,
+ \ 'col': 20,
+ \ 'code': 'MD013/line-length',
+ \ 'text': 'Line length [Expected: 80; Actual: 114]',
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#markdownlint#Handle(0, [
- \ 'README.md: 1: MD002/first-header-h1 First header should be a top level header [Expected: h1; Actual: h2]',
- \ 'README.md: 298: MD033/no-inline-html Inline HTML [Element: p]'
+ \ 'README.md:10:20 MD013/line-length Line length [Expected: 80; Actual: 114]'
\ ])