summaryrefslogtreecommitdiff
path: root/test/test_cleanup.vader
blob: 4f6827f4d8be54a4a21b1b5500ae7c7b6e9f25f3 (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
Before:
    let g:buffer = bufnr('%')
    let g:ale_buffer_count_map = {
    \ g:buffer: [1, 1],
    \ 10347: [1, 1],
    \}
    let g:ale_buffer_loclist_map = {
    \ g:buffer : [],
    \ 10347: [],
    \}
    let g:ale_buffer_should_reset_map = {
    \  g:buffer : 1,
    \  10347: 1,
    \}
    let g:ale_buffer_sign_dummy_map = {
    \  g:buffer : 1,
    \  10347: 1,
    \}

After:
    unlet! g:buffer
    let g:ale_buffer_count_map = {}
    let g:ale_buffer_loclist_map = {}
    let g:ale_buffer_should_reset_map = {}
    let g:ale_buffer_sign_dummy_map = {}

Execute('ALE globals should be cleared when the buffer is closed.'):
    :q!
    AssertEqual {10347: [1, 1]}, g:ale_buffer_count_map
    AssertEqual {10347: []}, g:ale_buffer_loclist_map
    AssertEqual {10347: 1}, g:ale_buffer_should_reset_map
    AssertEqual {10347: 1}, g:ale_buffer_sign_dummy_map