summaryrefslogtreecommitdiff
path: root/test/handler/test_markdownlint_handler.vader
blob: 8e9f77a04b86e64eea1615ad74222ad8a060b688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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]'
  \ ])