blob: 5621eb3516be1ecb95013312d85826d94c7e1f6b (
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
|
Before:
Save g:ale_buffer_info
call ale#linter#Reset()
After:
Restore
call setloclist(0, [])
call clearmatches()
call ale#sign#Clear()
Given foobar (Some file):
abc
Execute(The loclist shouldn't be cleared when opening the loclist):
call ale#engine#InitBufferInfo(bufnr(''))
let g:ale_buffer_info[bufnr('')].loclist = [
\ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2},
\]
call setloclist(0, g:ale_buffer_info[bufnr('')].loclist)
" The cleanup function is called when the loclist window is closed.
" If some cleanup is done for this buffer, for which nothing is wrong,
" then the loclist for the window, which is the same window as the window
" we are checking, will be cleared.
:lopen
:q
AssertEqual 1, len(ale#test#GetLoclistWithoutModule()), 'The loclist was cleared'
|