ale/test/test_ghc_handler.vader

31 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Execute(The ghc handler should handle hdevtools output):
AssertEqual
\ [
\ {'lnum': 147, 'bufnr': 12, 'vcol': 0, 'nr': -1, 'type': 'W', 'col': 62, 'text': ':• Couldnt match type a -> T.Text with T.Text Expected type: [T.Text]'},
\ ],
\ ale#handlers#HandleGhcFormat(12, [
\ '/path/to/foo.hs:147:62: warning:',
\ '• Couldnt match type a -> T.Text with T.Text',
\ ' Expected type: [T.Text]',
\ ])
Execute(The ghc handler should handle ghc output):
AssertEqual
\ [
\ {'lnum': 6, 'bufnr': 47, 'vcol': 0, 'nr': -1, 'type': 'E', 'col': 1, 'text': ': Failed to load interface for GitHub.Data Use -v to see a list of the files searched for.'},
\ {'lnum': 7, 'bufnr': 47, 'vcol': 0, 'nr': -1, 'type': 'E', 'col': 1, 'text': ': Failed to load interface for GitHub.Endpoints.PullRequests Use -v to see a list of the files searched for.'},
\ ],
\ ale#handlers#HandleGhcFormat(47, [
\ '',
\ 'src/Appoint/Lib.hs:6:1: error:',
\ ' Failed to load interface for GitHub.Data',
\ ' Use -v to see a list of the files searched for.',
\ '',
\ 'src/Appoint/Lib.hs:7:1: error:',
\ ' Failed to load interface for GitHub.Endpoints.PullRequests',
\ ' Use -v to see a list of the files searched for.',
\ ])