summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-09-08 20:10:00 +0100
committerw0rp <devw0rp@gmail.com>2017-09-08 20:10:11 +0100
commit89cc8ca31485b986fe9f7139afe77712b89cca11 (patch)
tree66a593ed4aafa7123361991e328159f7626fa655 /test
parentff288366165804e8956013cca8c1291536cf9707 (diff)
downloadale-89cc8ca31485b986fe9f7139afe77712b89cca11.zip
Fix #912 - Close lists automatically when g:ale_open_list is set to 'on_save' again
Diffstat (limited to 'test')
-rw-r--r--test/test_list_opening.vader7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_list_opening.vader b/test/test_list_opening.vader
index 7dc5a79b..63b30ef1 100644
--- a/test/test_list_opening.vader
+++ b/test/test_list_opening.vader
@@ -189,12 +189,19 @@ Execute(The ale_open_list='on_save' option should work):
" The list shouldn't open yet, the event wasn't fired.
Assert !ale#list#IsQuickfixOpen()
+ " Turn this option off, to ensure that we update lists immediately when we
+ " save buffers.
+ let g:ale_set_lists_synchronously = 0
let b:ale_save_event_fired = 1
call ale#list#SetLists(bufnr('%'), g:loclist)
" Now the list should have opened.
Assert ale#list#IsQuickfixOpen()
+ call ale#list#SetLists(bufnr('%'), [])
+ " The window should close again when the loclist is empty.
+ Assert !ale#list#IsQuickfixOpen()
+
Execute(The window shouldn't open on save when ale_open_list=0):
let b:ale_open_list = 0
let b:ale_save_event_fired = 1