ale/test/handler/test_gitlint_handler.vader

42 lines
1.2 KiB
Plaintext
Raw Normal View History

Before:
runtime ale_linters/gitcommit/gitlint.vim
After:
call ale#linter#Reset()
Execute(The gitlint handler should handle basic warnings and syntax errors):
AssertEqual
\ [
\ {
\ 'lnum': 1,
\ 'type': 'E',
\ 'text': 'Body message is missing',
\ 'code': 'B6',
\ },
\ {
\ 'lnum': 2,
\ 'type': 'E',
\ 'text': 'Second line is not empty: "to send to upstream"',
\ 'code': 'B4',
\ },
\ {
\ 'lnum': 3,
\ 'type': 'E',
\ 'text': 'Body message is too short (19<20): "to send to upstream"',
\ 'code': 'B5',
\ },
\ {
\ 'lnum': 8,
\ 'type': 'E',
\ 'text': 'Title exceeds max length (92>72): "some very long commit subject line where the author can''t wait to explain what he just fixed"',
\ 'code': 'T1',
\ },
\ ],
\ ale_linters#gitcommit#gitlint#Handle(1, [
\ '1: B6 Body message is missing',
\ '2: B4 Second line is not empty: "to send to upstream"',
\ '3: B5 Body message is too short (19<20): "to send to upstream"',
\ '8: T1 Title exceeds max length (92>72): "some very long commit subject line where the author can''t wait to explain what he just fixed"'
\ ])