summaryrefslogtreecommitdiff
path: root/test/test_linting_updates_loclist.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-10-24 20:21:32 +0100
committerw0rp <devw0rp@gmail.com>2016-10-24 20:21:42 +0100
commitc546f47cc0c003053fb157b0ca2cced46b5429bc (patch)
tree0a17bd9520adb8630838b16a84f1433d93fdec84 /test/test_linting_updates_loclist.vader
parent0dbf08f6d5466262e66a6000d83be7270a9cef53 (diff)
downloadale-c546f47cc0c003053fb157b0ca2cced46b5429bc.zip
Merge everything into the one global map.
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