summaryrefslogtreecommitdiff
path: root/test/test_statusline.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-22 21:19:36 +0100
committerw0rp <devw0rp@gmail.com>2017-08-22 21:19:36 +0100
commit1a524ca63e51092ab10febea40a6f018b6e85173 (patch)
tree3d12ec01af3bfebd1bb59b7e6727f750f5641d8e /test/test_statusline.vader
parent47a8ebc8b9ae76ee2b23e388d30324b97e102eed (diff)
downloadale-1a524ca63e51092ab10febea40a6f018b6e85173.zip
#653 - Always set loclist or quickfix in a timer callback, which prevents errors E924, E925, and E926
Diffstat (limited to 'test/test_statusline.vader')
-rw-r--r--test/test_statusline.vader10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_statusline.vader b/test/test_statusline.vader
index c47df75a..7978a509 100644
--- a/test/test_statusline.vader
+++ b/test/test_statusline.vader
@@ -1,9 +1,11 @@
Before:
- Save g:ale_statusline_format, g:ale_buffer_info
+ Save g:ale_statusline_format
+ Save g:ale_buffer_info
+
let g:ale_buffer_info = {}
" A function for conveniently creating expected count objects.
- function Counts(data) abort
+ function! Counts(data) abort
let l:res = {
\ '0': 0,
\ '1': 0,
@@ -28,6 +30,7 @@ Before:
After:
Restore
+
delfunction Counts
Execute (Count should be 0 when data is empty):
@@ -126,16 +129,13 @@ Execute (Status() should return the custom 'OK' string with the old format):
AssertEqual 'OKIE', ale#statusline#Status()
Execute(ale#statusline#Update shouldn't blow up when globals are undefined):
- unlet! g:ale_buffer_info
unlet! g:ale_statusline_format
call ale#statusline#Update(1, [])
Execute(ale#statusline#Count should return 0 counts when globals are undefined):
- unlet! g:ale_buffer_info
unlet! g:ale_statusline_format
AssertEqual Counts({}), ale#statusline#Count(1)
Execute(ale#statusline#Status should return 'OK' when globals are undefined):
- unlet! g:ale_buffer_info
unlet! g:ale_statusline_format
AssertEqual 'OK', ale#statusline#Status()