summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-16 21:33:44 +0000
committerw0rp <devw0rp@gmail.com>2017-02-16 21:33:44 +0000
commitca17b5aebdd9bb2e31d01ae16e18047bae375c3c (patch)
tree9c71ffb6e95acca17f4eddaebe79dab87beb256e /test
parent3a2286a1b8d8b2004b0a10656192b6823a89f690 (diff)
downloadale-ca17b5aebdd9bb2e31d01ae16e18047bae375c3c.zip
Add an option for completely disabling command history, and add documentation
Diffstat (limited to 'test')
-rw-r--r--test/test_history_saving.vader11
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''}'),