summaryrefslogtreecommitdiff
path: root/test/test_ale_info.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-16 22:19:53 +0000
committerw0rp <devw0rp@gmail.com>2017-02-16 22:19:53 +0000
commit843370b96f9a92a2298ed7985a8f620784fc9421 (patch)
tree00ca288fc4df7d64d2e6e68aabcf64e131e7472b /test/test_ale_info.vader
parentca17b5aebdd9bb2e31d01ae16e18047bae375c3c (diff)
downloadale-843370b96f9a92a2298ed7985a8f620784fc9421.zip
#254 Capture command exit codes in the history
Diffstat (limited to 'test/test_ale_info.vader')
-rw-r--r--test/test_ale_info.vader27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/test_ale_info.vader b/test/test_ale_info.vader
index c8c20677..92025f23 100644
--- a/test/test_ale_info.vader
+++ b/test/test_ale_info.vader
@@ -191,3 +191,30 @@ Execute (ALEInfo should return command history):
\ '(started) [''/bin/bash'', ''\c'', ''last command'']',
\ ], "\n"),
\ g:output
+
+Given testft.testft2 (Empty buffer with two filetypes):
+Execute (ALEInfo command history should print exit codes correctly):
+ let g:ale_buffer_info[bufnr('%')] = {
+ \ 'history': [
+ \ {'status': 'finished', 'exit_code': 0, 'job_id': 347, 'command': 'first command'},
+ \ {'status': 'finished', 'exit_code': 1, 'job_id': 347, 'command': ['/bin/bash', '\c', 'last command']},
+ \ ],
+ \}
+
+ call ale#linter#Define('testft', g:testlinter1)
+ call ale#linter#Define('testft2', g:testlinter2)
+ redir => g:output
+ silent ALEInfo
+ redir END
+ AssertEqual
+ \ join([
+ \ '',
+ \ ' Current Filetype: testft.testft2',
+ \ 'Available Linters: [''testlinter1'', ''testlinter2'']',
+ \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']',
+ \ ' Linter Variables:',
+ \ g:globals_string . g:command_header,
+ \ '(finished - exit code 0) ''first command''',
+ \ '(finished - exit code 1) [''/bin/bash'', ''\c'', ''last command'']',
+ \ ], "\n"),
+ \ g:output