mirror of
https://github.com/dense-analysis/ale
synced 2024-12-22 06:10:07 +00:00
Fix the cursor tests, that stop tests running
This commit is contained in:
parent
93a13d7353
commit
1f9ac1c6dc
@ -15,7 +15,7 @@ Before:
|
||||
\ 'col': 10,
|
||||
\ 'bufnr': bufnr('%'),
|
||||
\ 'vcol': 0,
|
||||
\ 'linter_name': 'eslint',
|
||||
\ 'linter_name': 'bettercode',
|
||||
\ 'nr': -1,
|
||||
\ 'type': 'W',
|
||||
\ 'code': 'semi',
|
||||
@ -26,7 +26,7 @@ Before:
|
||||
\ 'col': 10,
|
||||
\ 'bufnr': bufnr('%'),
|
||||
\ 'vcol': 0,
|
||||
\ 'linter_name': 'eslint',
|
||||
\ 'linter_name': 'bettercode',
|
||||
\ 'nr': -1,
|
||||
\ 'type': 'E',
|
||||
\ 'code': 'semi',
|
||||
@ -38,7 +38,7 @@ Before:
|
||||
\ 'col': 14,
|
||||
\ 'bufnr': bufnr('%'),
|
||||
\ 'vcol': 0,
|
||||
\ 'linter_name': 'eslint',
|
||||
\ 'linter_name': 'bettercode',
|
||||
\ 'nr': -1,
|
||||
\ 'type': 'I',
|
||||
\ 'text': 'Some information',
|
||||
@ -48,7 +48,7 @@ Before:
|
||||
\ 'col': 10,
|
||||
\ 'bufnr': bufnr('%'),
|
||||
\ 'vcol': 0,
|
||||
\ 'linter_name': 'eslint',
|
||||
\ 'linter_name': 'bettercode',
|
||||
\ 'nr': -1,
|
||||
\ 'type': 'W',
|
||||
\ 'code': 'space-infix-ops',
|
||||
@ -59,7 +59,7 @@ Before:
|
||||
\ 'col': 15,
|
||||
\ 'bufnr': bufnr('%'),
|
||||
\ 'vcol': 0,
|
||||
\ 'linter_name': 'eslint',
|
||||
\ 'linter_name': 'bettercode',
|
||||
\ 'nr': -1,
|
||||
\ 'type': 'E',
|
||||
\ 'code': 'radix',
|
||||
@ -70,22 +70,11 @@ Before:
|
||||
\ 'col': 1,
|
||||
\ 'bufnr': bufnr('%'),
|
||||
\ 'vcol': 0,
|
||||
\ 'linter_name': 'eslint',
|
||||
\ 'linter_name': 'bettercode',
|
||||
\ 'nr': -1,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'lowercase error',
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 3,
|
||||
\ 'col': 5,
|
||||
\ 'bufnr': bufnr('%'),
|
||||
\ 'vcol': 0,
|
||||
\ 'linter_name': 'fakecodelinter',
|
||||
\ 'nr': -1,
|
||||
\ 'type': 'E',
|
||||
\ 'code': 'E001',
|
||||
\ 'text': 'This error does not exist',
|
||||
\ },
|
||||
\ ],
|
||||
\ },
|
||||
\}
|
||||
@ -207,7 +196,7 @@ Execute(The linter name should be formatted into the message correctly):
|
||||
call ale#cursor#EchoCursorWarning()
|
||||
|
||||
AssertEqual
|
||||
\ 'eslint: Infix operators must be spaced.',
|
||||
\ 'bettercode: Infix operators must be spaced.',
|
||||
\ GetLastMessage()
|
||||
|
||||
Execute(The severity should be formatted into the message correctly):
|
||||
@ -248,14 +237,6 @@ Execute(The %code% and %ifcode% should be removed when there's no code):
|
||||
|
||||
AssertEqual 'Some information', GetLastMessage()
|
||||
|
||||
Execute(The %code% should be formatted correctly when other variables contain 'code'):
|
||||
let g:ale_echo_msg_format = '%s (%linter%% code%)'
|
||||
|
||||
call cursor(3, 5)
|
||||
call ale#cursor#EchoCursorWarning()
|
||||
|
||||
AssertEqual 'This error does not exist (fakecodelinter E001)', GetLastMessage()
|
||||
|
||||
Execute(The buffer message format option should take precedence):
|
||||
let g:ale_echo_msg_format = '%(code) %%s'
|
||||
let b:ale_echo_msg_format = 'FOO %s'
|
||||
|
Loading…
Reference in New Issue
Block a user