diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_history_saving.vader | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_history_saving.vader b/test/test_history_saving.vader index d30534b7..b3afdca2 100644 --- a/test/test_history_saving.vader +++ b/test/test_history_saving.vader @@ -16,6 +16,7 @@ Before: \}) After: + let g:ale_history_enabled = 1 unlet g:history let g:ale_buffer_info = {} let g:ale_max_buffer_history_size = 20 @@ -40,6 +41,16 @@ Execute(History should be set when commands are run): " The Job ID will change each time, but we can check the type. AssertEqual type(1), type(g:history[0].job_id) +Execute(History should be not set when disabled): + AssertEqual 'foobar', &filetype + + let g:ale_history_enabled = 0 + + call ale#Lint() + call ale#engine#WaitForJobs(2000) + + AssertEqual 0, len(g:ale_buffer_info[bufnr('%')].history) + Execute(History items should be popped after going over the max): let g:ale_buffer_info[1] = { \ 'history': map(range(20), '{''status'': ''started'', ''job_id'': v:val, ''command'': ''foobar''}'), |