Fix the cursor tests, that stop tests running

This commit is contained in:
w0rp 2020-04-18 12:26:38 +01:00
parent 93a13d7353
commit 1f9ac1c6dc
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83

View File

@ -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'