diff options
author | w0rp <devw0rp@gmail.com> | 2017-03-02 23:36:31 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-03-02 23:36:31 +0000 |
commit | 0e50a7d2783fb82ce4abf9ad6c58c5a035d9d047 (patch) | |
tree | d4fee4d76b362377e704ed4c810b78728b2fddef /test/test_cursor_warnings.vader | |
parent | fab9e8f5ea897a6a51c8a516b4b78c3f8c0bad46 (diff) | |
download | ale-0e50a7d2783fb82ce4abf9ad6c58c5a035d9d047.zip |
Fix #373 - echo the cursor message after lint cycles or when leaving Insert mode
Diffstat (limited to 'test/test_cursor_warnings.vader')
-rw-r--r-- | test/test_cursor_warnings.vader | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/test_cursor_warnings.vader b/test/test_cursor_warnings.vader index b12f2451..8d998a87 100644 --- a/test/test_cursor_warnings.vader +++ b/test/test_cursor_warnings.vader @@ -36,7 +36,16 @@ Before: \ }, \} + " Turn off other features, we only care about this one feature in this test. + let g:ale_set_loclist = 0 + let g:ale_set_signs = 0 + let g:ale_set_highlights = 0 + After: + let g:ale_set_loclist = 1 + let g:ale_set_signs = 1 + let g:ale_set_highlights = 1 + unlet! g:output unlet! g:lines let g:ale_buffer_info = {} @@ -84,3 +93,33 @@ Then(Check the cursor output): let g:lines = split(g:output, "\n") AssertEqual 'Missing radix parameter (radix)', g:lines[-1] + +Execute(Set results for a lint cycle, with the cursor on line 1): + :1 + call ale#engine#SetResults( + \ bufnr('%'), + \ g:ale_buffer_info[bufnr('%')].loclist, + \) + +Then(Check the cursor output): + redir => g:output + :mess + redir END + + let g:lines = split(g:output, "\n") + + AssertEqual 'Missing semicolon. (semi)', g:lines[-1] + +Execute(Simulate leaving insert mode on line 2): + :2 + normal 16h + doautocmd InsertLeave + +Then(Check the cursor output): + redir => g:output + :mess + redir END + + let g:lines = split(g:output, "\n") + + AssertEqual 'Infix operators must be spaced. (space-infix-ops)', g:lines[-1] |