File: test_write_good_handler.vader

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (37 lines) | stat: -rw-r--r-- 917 bytes parent folder | download | duplicates (3)
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
Execute(The write-good handler should handle the example from the write-good README):
  AssertEqual
  \ [
  \   {
  \     'lnum': 1,
  \     'col': 1,
  \     'end_col': 2,
  \     'type': 'W',
  \     'text': '"So" adds no meaning',
  \   },
  \   {
  \     'lnum': 1,
  \     'col': 12,
  \     'end_col': 21,
  \     'type': 'W',
  \     'text': '"was stolen" may be passive voice',
  \   },
  \   {
  \     'lnum': 6,
  \     'col': 2,
  \     'end_col': 2,
  \     'type': 'W',
  \     'text': '"foo bar" bla',
  \   },
  \ ],
  \ ale#handlers#writegood#Handle(bufnr(''), [
  \ 'In /tmp/vBYivbZ/6/test.md',
  \ '=============',
  \ 'So the cat was stolen.',
  \ '^^',
  \ '"So" adds no meaning on line 1 at column 0',
  \ '-------------',
  \ 'So the cat was stolen.',
  \ '           ^^^^^^^^^^',
  \ '"was stolen" may be passive voice on line 1 at column 11',
  \ '"foo bar" bla on line 6 at column 1',
  \ ])