diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-15 23:19:11 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-15 23:19:11 +0100 |
commit | 6e1a5d4189eee015202cdfe90ced638c195aab23 (patch) | |
tree | c3fe2ed47d1e6e42e6cd0ea1f6f406a850c4fc45 /test | |
parent | b2e2bbd0420133601c2f975109f90123b4e23d7e (diff) | |
download | ale-6e1a5d4189eee015202cdfe90ced638c195aab23.zip |
Stop the no loclist clearing test from failing in NeoVim 0.3
Diffstat (limited to 'test')
-rw-r--r-- | test/test_results_not_cleared_when_opening_loclist.vader | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/test/test_results_not_cleared_when_opening_loclist.vader b/test/test_results_not_cleared_when_opening_loclist.vader index c983a89f..dd928fa0 100644 --- a/test/test_results_not_cleared_when_opening_loclist.vader +++ b/test/test_results_not_cleared_when_opening_loclist.vader @@ -1,31 +1,11 @@ Before: - Save g:ale_run_synchronously + Save g:ale_buffer_info - let g:ale_run_synchronously = 1 - - function! TestCallback(buffer, output) - return [ - \ { - \ 'lnum': 1, - \ 'text': 'Something is wrong', - \ }, - \] - endfunction - - call ale#linter#Define('foobar', { - \ 'name': 'testlinter', - \ 'callback': 'TestCallback', - \ 'executable': has('win32') ? 'cmd' : 'true', - \ 'command': 'true', - \ 'read_buffer': 0, - \}) + call ale#linter#Reset() After: Restore - delfunction TestCallback - let g:ale_buffer_info = {} - call ale#linter#Reset() call setloclist(0, []) call clearmatches() sign unplace * @@ -34,10 +14,11 @@ Given foobar (Some file): abc Execute(The loclist shouldn't be cleared when opening the loclist): - call ale#Lint() - sleep 1ms - - AssertEqual 1, len(getloclist(0)), 'The loclist was never set' + 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, |