]> git.madduck.net Git - etc/vim.git/blob - test/test_results_not_cleared_when_opening_loclist.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / test_results_not_cleared_when_opening_loclist.vader
1 Before:
2   Save g:ale_buffer_info
3
4   call ale#linter#Reset()
5
6 After:
7   Restore
8
9   call setloclist(0, [])
10   call clearmatches()
11   call ale#sign#Clear()
12
13 Given foobar (Some file):
14   abc
15
16 Execute(The loclist shouldn't be cleared when opening the loclist):
17   call ale#engine#InitBufferInfo(bufnr(''))
18   let g:ale_buffer_info[bufnr('')].loclist = [
19   \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2},
20   \]
21   call setloclist(0, g:ale_buffer_info[bufnr('')].loclist)
22
23   " The cleanup function is called when the loclist window is closed.
24   " If some cleanup is done for this buffer, for which nothing is wrong,
25   " then the loclist for the window, which is the same window as the window
26   " we are checking, will be cleared.
27   :lopen
28   :q
29
30   AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()), 'The loclist was cleared'