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
|
Before:
let g:loclist = [
\ {
\ 'lnum': 1,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'linter_name': 'eslint',
\ 'nr': -1,
\ 'type': 'E',
\ 'col': 10,
\ 'text': 'Missing semicolon. (semi)'
\ },
\ {
\ 'lnum': 2,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'linter_name': 'eslint',
\ 'nr': -1,
\ 'type': 'W',
\ 'col': 10,
\ 'text': 'Infix operators must be spaced. (space-infix-ops)'
\ },
\]
let g:ale_buffer_info = {'1': {'loclist': g:loclist}}
After:
unlet g:loclist
let g:ale_buffer_info = {}
Execute(GetLoclist should return the loclist):
AssertEqual g:loclist, ale#engine#GetLoclist(1)
|