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.
4 Save g:ale_set_quickfix
8 let g:ale_buffer_info = {}
10 let g:ale_set_quickfix = 0
11 let g:ale_set_loclist = 0
12 let g:ale_open_list = 1
14 let g:expected_loclist = [{
15 \ 'bufnr': bufnr('%'),
26 function! ToggleTestCallback(buffer, output)
32 \ 'text': join(split(a:output[0])),
38 call ale#linter#Define('foobar', {
39 \ 'name': 'testlinter',
40 \ 'callback': 'ToggleTestCallback',
41 \ 'executable': has('win32') ? 'cmd' : 'echo',
42 \ 'command': 'echo foo bar',
48 unlet! g:expected_loclist
51 call ale#engine#Cleanup(bufnr(''))
52 call ale#linter#Reset()
54 " Not sure this is necessary since it was Save/Restore-d
55 let g:ale_buffer_info = {}
57 delfunction ToggleTestCallback
59 Given foobar (Some imaginary filetype):
64 Execute(ALEPopulateQuickfix should have results):
65 AssertEqual 'foobar', &filetype
67 " Clear so we can check that they're unmodified.
69 call setloclist(winnr(), [])
71 " Try to run the linter a few times, as it fails randomly in NeoVim.
74 call ale#test#WaitForJobs(2000)
77 " Sleep so the delayed list function can run.
78 " This breaks the tests in NeoVim for some reason.
82 if ale#test#GetLoclistWithoutNewerKeys() == g:expected_loclist
88 AssertEqual [], ale#test#GetLoclistWithoutNewerKeys()
89 AssertEqual [], ale#test#GetQflistWithoutNewerKeys()
92 AssertNotEqual 0, get(getloclist(0, {'winid':0}), 'winid', 0)
93 AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys()
96 AssertEqual g:expected_loclist, ale#test#GetQflistWithoutNewerKeys()