2017-03-08 19:43:53 -05:00
|
|
|
Before:
|
2017-08-14 18:31:46 -04:00
|
|
|
Save g:ale_buffer_info
|
|
|
|
|
2017-08-19 09:28:51 -04:00
|
|
|
let g:ale_buffer_info = {
|
|
|
|
\ bufnr(''): {
|
|
|
|
\ 'loclist': [{'bufnr': bufnr(''), 'lnum': 4, 'col': 1, 'text': 'foo'}]
|
|
|
|
\ },
|
|
|
|
\}
|
2017-08-14 18:31:46 -04:00
|
|
|
|
2017-03-08 19:43:53 -05:00
|
|
|
let g:original_buffer = bufnr('%')
|
2017-08-14 18:31:46 -04:00
|
|
|
noautocmd new
|
2017-03-08 19:43:53 -05:00
|
|
|
|
|
|
|
After:
|
2017-08-14 18:31:46 -04:00
|
|
|
Restore
|
|
|
|
|
2017-03-08 19:43:53 -05:00
|
|
|
unlet! g:original_buffer
|
|
|
|
|
|
|
|
Execute(Errors should be set in the loclist for the original buffer, not the new one):
|
2017-08-19 09:28:51 -04:00
|
|
|
call ale#list#SetLists(
|
|
|
|
\ g:original_buffer,
|
|
|
|
\ g:ale_buffer_info[(g:original_buffer)].loclist,
|
|
|
|
\ )
|
2017-03-08 19:43:53 -05:00
|
|
|
|
2018-07-23 15:41:06 -04:00
|
|
|
AssertEqual [], ale#test#GetLoclistWithoutModule()
|
2017-03-08 19:43:53 -05:00
|
|
|
AssertEqual 1, len(getloclist(bufwinid(g:original_buffer)))
|
|
|
|
AssertEqual 'foo', getloclist(bufwinid(g:original_buffer))[0].text
|