diff options
author | w0rp <devw0rp@gmail.com> | 2017-03-04 23:55:12 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-03-04 23:55:12 +0000 |
commit | 76df2d393b6b79f1f0d3095589e7f3ac90de2b40 (patch) | |
tree | 6715b53854ef7fa1b92a10c4afd38a53fa3e5b17 /test | |
parent | c1947d13cf7ec2e15058f5eea232d9b0c2377d44 (diff) | |
download | ale-76df2d393b6b79f1f0d3095589e7f3ac90de2b40.zip |
Fix detailed messages with newline characters
Diffstat (limited to 'test')
-rw-r--r-- | test/test_cursor_warnings.vader | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/test/test_cursor_warnings.vader b/test/test_cursor_warnings.vader index 5e37036a..09081b12 100644 --- a/test/test_cursor_warnings.vader +++ b/test/test_cursor_warnings.vader @@ -11,7 +11,7 @@ Before: \ 'nr': -1, \ 'type': 'E', \ 'text': 'Missing semicolon. (semi)', - \ 'detail': 'Every statement should end with a semicolon' + \ 'detail': "Every statement should end with a semicolon\nsecond line" \ }, \ { \ 'lnum': 2, @@ -61,6 +61,8 @@ After: let g:ale_buffer_info = {} + unlet! g:output + delfunction GetLastMessage mess clear @@ -104,12 +106,18 @@ Execute(The message at the cursor should be shown on InsertLeave): Execute(ALEDetail should print 'detail' attributes): call cursor(1, 1) - ALEDetail - AssertEqual "Every statement should end with a semicolon", GetLastMessage() + redir => g:output + ALEDetail + redir END + + AssertEqual "\nEvery statement should end with a semicolon\nsecond line", g:output Execute(ALEDetail should print regular 'text' attributes): call cursor(2, 10) - ALEDetail - AssertEqual "Infix operators must be spaced. (space-infix-ops)", GetLastMessage() + redir => g:output + ALEDetail + redir END + + AssertEqual "\nInfix operators must be spaced. (space-infix-ops)", g:output |