summaryrefslogtreecommitdiff
path: root/test/test_linting_updates_loclist.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_linting_updates_loclist.vader')
-rw-r--r--test/test_linting_updates_loclist.vader28
1 files changed, 24 insertions, 4 deletions
diff --git a/test/test_linting_updates_loclist.vader b/test/test_linting_updates_loclist.vader
index 920a4e46..06f11d8b 100644
--- a/test/test_linting_updates_loclist.vader
+++ b/test/test_linting_updates_loclist.vader
@@ -3,15 +3,35 @@ Given javascript (Some JavaScript with problems):
var y = 3
Before:
- let g:ale_buffer_loclist_map = {}
- let g:expected_data = {bufnr('%'): [{'lnum': 1, 'bufnr': bufnr('%'), 'vcol': 0, 'linter_name': 'eslint', 'nr': -1, 'type': 'W', 'col': 10, 'text': 'Infix operators must be spaced. [Warning/space-infix-ops]'}, {'lnum': 2, 'bufnr': bufnr('%'), 'vcol': 0, 'linter_name': 'eslint', 'nr': -1, 'type': 'E', 'col': 10, 'text': 'Missing semicolon. [Error/semi]'}]}
+ let g:expected_data = [
+ \ {
+ \ 'lnum': 1,
+ \ 'bufnr': bufnr('%'),
+ \ 'vcol': 0,
+ \ 'linter_name': 'eslint',
+ \ 'nr': -1,
+ \ 'type': 'W',
+ \ 'col': 10,
+ \ 'text': 'Infix operators must be spaced. [Warning/space-infix-ops]',
+ \ },
+ \ {
+ \ 'lnum': 2,
+ \ 'bufnr': bufnr('%'),
+ \ 'vcol': 0,
+ \ 'linter_name': 'eslint',
+ \ 'nr': -1,
+ \ 'type': 'E',
+ \ 'col': 10,
+ \ 'text': 'Missing semicolon. [Error/semi]',
+ \ }
+ \]
After:
- let g:ale_buffer_loclist_map = {}
unlet g:expected_data
Execute(The loclist should be updated after linting is done):
call ale#Lint()
call ale#engine#WaitForJobs(2000)
- AssertEqual g:expected_data, g:ale_buffer_loclist_map
+ AssertEqual ['' . bufnr('%')], keys(g:ale_buffer_info)
+ AssertEqual g:expected_data, g:ale_buffer_info[bufnr('%')].loclist