summaryrefslogtreecommitdiff
path: root/test/test_cursor_warnings.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-14 23:25:01 +0000
committerw0rp <devw0rp@gmail.com>2017-11-14 23:25:01 +0000
commitd48506f9c17915a72ff773f11728958e723e9e92 (patch)
treefc44c676d4909c33564ec27499066e3d66ca6109 /test/test_cursor_warnings.vader
parent6b2c61a5cc59d61270266dbe399d5dc55cfad5b4 (diff)
downloadale-d48506f9c17915a72ff773f11728958e723e9e92.zip
Fix #757 - Show :ALEDetail messages in a window
Diffstat (limited to 'test/test_cursor_warnings.vader')
-rw-r--r--test/test_cursor_warnings.vader22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/test_cursor_warnings.vader b/test/test_cursor_warnings.vader
index dbcbe66e..c6dc5269 100644
--- a/test/test_cursor_warnings.vader
+++ b/test/test_cursor_warnings.vader
@@ -97,6 +97,11 @@ After:
" carried over between test cases.
echomsg ''
+ " Close the preview window if it's open.
+ if &filetype is# 'ale-preview'
+ noautocmd :q!
+ endif
+
Given javascript(A Javscript file with warnings/errors):
var x = 3 + 12345678
var x = 5*2 + parseInt("10");
@@ -138,20 +143,21 @@ Execute(The message at the cursor should be shown on InsertLeave):
Execute(ALEDetail should print 'detail' attributes):
call cursor(1, 1)
- redir => g:output
- ALEDetail
- redir END
+ ALEDetail
- AssertEqual "\nEvery statement should end with a semicolon\nsecond line", g:output
+ AssertEqual
+ \ ['Every statement should end with a semicolon', 'second line'],
+ \ getline(1, '$')
Execute(ALEDetail should print regular 'text' attributes):
call cursor(2, 10)
- redir => g:output
- ALEDetail
- redir END
+ ALEDetail
- AssertEqual "\nInfix operators must be spaced.", g:output
+ " ALEDetail opens a window, so check the text in it.
+ AssertEqual
+ \ ['Infix operators must be spaced.'],
+ \ getline(1, '$')
Execute(ALEDetail should not capitlise cursor messages):
call cursor(3, 1)