2017-03-09 00:43:53 +00:00
|
|
|
Before:
|
2017-08-14 22:31:46 +00:00
|
|
|
Save g:ale_buffer_info
|
|
|
|
|
|
|
|
let g:ale_buffer_info = {}
|
|
|
|
|
2017-03-09 00:43:53 +00:00
|
|
|
let g:original_buffer = bufnr('%')
|
2017-08-14 22:31:46 +00:00
|
|
|
noautocmd new
|
2017-03-09 00:43:53 +00:00
|
|
|
|
|
|
|
After:
|
2017-08-14 22:31:46 +00:00
|
|
|
Restore
|
|
|
|
|
2017-03-09 00:43:53 +00:00
|
|
|
unlet! g:original_buffer
|
|
|
|
|
|
|
|
Execute(Errors should be set in the loclist for the original buffer, not the new one):
|
|
|
|
call ale#list#SetLists(g:original_buffer, [{'lnum': 4, 'text': 'foo'}])
|
|
|
|
|
|
|
|
AssertEqual [], getloclist(0)
|
|
|
|
AssertEqual 1, len(getloclist(bufwinid(g:original_buffer)))
|
|
|
|
AssertEqual 'foo', getloclist(bufwinid(g:original_buffer))[0].text
|