diff options
author | w0rp <devw0rp@gmail.com> | 2017-02-16 23:18:57 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-02-16 23:18:57 +0000 |
commit | eac0a41ae1aba77e1d017833425fa8132130df13 (patch) | |
tree | 1bd9b6f30a43b3066236937df5e88341559fae33 /test/test_history_saving.vader | |
parent | 843370b96f9a92a2298ed7985a8f620784fc9421 (diff) | |
download | ale-eac0a41ae1aba77e1d017833425fa8132130df13.zip |
#254 Add an option for logging the output of commands
Diffstat (limited to 'test/test_history_saving.vader')
-rw-r--r-- | test/test_history_saving.vader | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_history_saving.vader b/test/test_history_saving.vader index 23b9170b..303a02fa 100644 --- a/test/test_history_saving.vader +++ b/test/test_history_saving.vader @@ -17,6 +17,7 @@ Before: After: let g:ale_history_enabled = 1 + let g:ale_history_log_output = 0 unlet g:history let g:ale_buffer_info = {} let g:ale_max_buffer_history_size = 20 @@ -52,6 +53,19 @@ Execute(History should be not set when disabled): AssertEqual 0, len(g:ale_buffer_info[bufnr('%')].history) +Execute(History should include command output if logging is enabled): + AssertEqual 'foobar', &filetype + + let g:ale_history_log_output = 1 + + call ale#Lint() + call ale#engine#WaitForJobs(2000) + + let g:history = g:ale_buffer_info[bufnr('%')].history + + AssertEqual 1, len(g:history) + AssertEqual ['command history test'], g:history[0].output + 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''}'), |