From 57ad32f98656eebdc8c903d670c92cf458b31dce Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 21 May 2017 18:58:26 +0100 Subject: Fix counting of warnings and style warnings --- test/test_statusline.vader | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'test/test_statusline.vader') diff --git a/test/test_statusline.vader b/test/test_statusline.vader index d7c6b15e..bd0fd5dc 100644 --- a/test/test_statusline.vader +++ b/test/test_statusline.vader @@ -46,20 +46,34 @@ Execute (Count should be match the loclist): let g:ale_buffer_info = { \ bufnr('%'): { \ 'loclist': [ - \ { - \ 'lnum': 1, - \ 'bufnr': 1, - \ 'vcol': 0, - \ 'linter_name': 'testlinter', - \ 'nr': -1, - \ 'type': 'E', - \ 'col': 1, - \ 'text': 'Test Error', - \ }, + \ {'type': 'E'}, + \ {'type': 'E', 'sub_type': 'style'}, + \ {'type': 'E', 'sub_type': 'style'}, + \ {'type': 'W'}, + \ {'type': 'W'}, + \ {'type': 'W'}, + \ {'type': 'W', 'sub_type': 'style'}, + \ {'type': 'W', 'sub_type': 'style'}, + \ {'type': 'W', 'sub_type': 'style'}, + \ {'type': 'W', 'sub_type': 'style'}, + \ {'type': 'I'}, + \ {'type': 'I'}, + \ {'type': 'I'}, + \ {'type': 'I'}, + \ {'type': 'I'}, \ ], \ }, \} - AssertEqual Counts({'error': 1}), ale#statusline#Count(bufnr('%')) + AssertEqual { + \ 'error': 1, + \ 'style_error': 2, + \ 'warning': 3, + \ 'style_warning': 4, + \ 'info': 5, + \ '0': 3, + \ '1': 12, + \ 'total': 15, + \}, ale#statusline#Count(bufnr('%')) Execute (Output should be empty for non-existant buffer): AssertEqual Counts({}), ale#statusline#Count(9001) -- cgit v1.2.3