summaryrefslogtreecommitdiff
path: root/test/test_history_saving.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-16 21:18:03 +0000
committerw0rp <devw0rp@gmail.com>2017-02-16 21:18:03 +0000
commit3a2286a1b8d8b2004b0a10656192b6823a89f690 (patch)
treec7faadd3487262595b393645ef518dab0f00b82b /test/test_history_saving.vader
parent434ff01f59835c06a799585a4dbbbb3711d95b64 (diff)
downloadale-3a2286a1b8d8b2004b0a10656192b6823a89f690.zip
Refactor history management functions into their own file
Diffstat (limited to 'test/test_history_saving.vader')
-rw-r--r--test/test_history_saving.vader14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_history_saving.vader b/test/test_history_saving.vader
index a06f9a78..d30534b7 100644
--- a/test/test_history_saving.vader
+++ b/test/test_history_saving.vader
@@ -36,21 +36,21 @@ Execute(History should be set when commands are run):
AssertEqual 1, len(g:history)
AssertEqual ['status', 'job_id', 'command'], keys(g:history[0])
AssertEqual ['/bin/bash', '-c', 'echo command history test'], g:history[0].command
- AssertEqual 'ran', g:history[0].status
+ AssertEqual 'started', g:history[0].status
" The Job ID will change each time, but we can check the type.
AssertEqual type(1), type(g:history[0].job_id)
Execute(History items should be popped after going over the max):
let g:ale_buffer_info[1] = {
- \ 'history': map(range(20), '{''status'': ''ran'', ''job_id'': v:val, ''command'': ''foobar''}'),
+ \ 'history': map(range(20), '{''status'': ''started'', ''job_id'': v:val, ''command'': ''foobar''}'),
\}
- call ale#engine#AddToHistory(1, 'ran', 347, 'last command')
+ call ale#history#Add(1, 'started', 347, 'last command')
AssertEqual
\ (
- \ map(range(1, 19), '{''status'': ''ran'', ''job_id'': v:val, ''command'': ''foobar''}')
- \ + [{'status': 'ran', 'job_id': 347, 'command': 'last command'}]
+ \ map(range(1, 19), '{''status'': ''started'', ''job_id'': v:val, ''command'': ''foobar''}')
+ \ + [{'status': 'started', 'job_id': 347, 'command': 'last command'}]
\ ),
\ g:ale_buffer_info[1].history
@@ -58,12 +58,12 @@ Execute(Nothing should be added to history if the size is too low):
let g:ale_max_buffer_history_size = 0
let g:ale_buffer_info[1] = {'history': []}
- call ale#engine#AddToHistory(1, 'ran', 347, 'last command')
+ call ale#history#Add(1, 'started', 347, 'last command')
AssertEqual [], g:ale_buffer_info[1].history
let g:ale_max_buffer_history_size = -2
- call ale#engine#AddToHistory(1, 'ran', 347, 'last command')
+ call ale#history#Add(1, 'started', 347, 'last command')
AssertEqual [], g:ale_buffer_info[1].history