Add a test to check that buffer cleanup works.
This commit is contained in:
parent
1300fdc84b
commit
7c2a16e149
1 changed files with 32 additions and 0 deletions
32
test/test_cleanup.vader
Normal file
32
test/test_cleanup.vader
Normal file
|
@ -0,0 +1,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
|
Reference in a new issue