This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/test_balloon_messages.vader

42 lines
948 B
Text
Raw Normal View History

2017-05-31 21:04:33 +00:00
Before:
Save g:ale_buffer_info
let g:ale_buffer_info[347] = {'loclist': [
\ {
\ 'bufnr': 347,
2017-05-31 21:04:33 +00:00
\ 'lnum': 1,
\ 'col': 10,
\ 'text': 'Missing semicolon. (semi)',
\ },
\ {
\ 'bufnr': 347,
2017-05-31 21:04:33 +00:00
\ 'lnum': 2,
\ 'col': 10,
\ 'text': 'Infix operators must be spaced. (space-infix-ops)'
\ },
\ {
\ 'bufnr': 347,
2017-05-31 21:04:33 +00:00
\ 'lnum': 2,
\ 'col': 15,
\ 'text': 'Missing radix parameter (radix)'
\ },
\]}
After:
Restore
Execute(Balloon messages should be shown for the correct lines):
AssertEqual
\ 'Missing semicolon. (semi)',
\ ale#balloon#MessageForPos(347, 1, 1)
Execute(Balloon messages should be shown for earlier columns):
AssertEqual
\ 'Infix operators must be spaced. (space-infix-ops)',
\ ale#balloon#MessageForPos(347, 2, 1)
Execute(Balloon messages should be shown for later columns):
AssertEqual
\ 'Missing radix parameter (radix)',
\ ale#balloon#MessageForPos(347, 2, 16)