summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRob Berry <rob@luvhate.us>2017-02-14 22:47:53 +0000
committerRob Berry <rob@luvhate.us>2017-02-17 17:18:38 +0000
commit06fe8a043f5046405327984ab05641d3280f4cbc (patch)
treeb8004a738659cc23e7feef8ae67b6341d3cf444a /test
parentc4afd727926ec11d1f980847c48f0828784402d6 (diff)
downloadale-06fe8a043f5046405327984ab05641d3280f4cbc.zip
Add hdevtools linter for haskell
This adds support for the hdevtools haskell linter https://github.com/hdevtools/hdevtools The output for hdevtools is near identical to the ghc output so this also extracts the ghc handler into the handle file and adds tests * Add testing for previous major release of ghc
Diffstat (limited to 'test')
-rw-r--r--test/test_ghc_handler.vader22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/test_ghc_handler.vader b/test/test_ghc_handler.vader
index ef516314..2350d9e5 100644
--- a/test/test_ghc_handler.vader
+++ b/test/test_ghc_handler.vader
@@ -2,7 +2,7 @@ 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]'},
+ \ {'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:',
@@ -11,12 +11,12 @@ Execute(The ghc handler should handle hdevtools output):
\ ])
-Execute(The ghc handler should handle ghc output):
+Execute(The ghc handler should handle ghc 8 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.'},
+ \ {'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': 'W', '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, [
\ '',
@@ -24,7 +24,19 @@ Execute(The ghc handler should handle ghc output):
\ ' 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:',
+ \ 'src/Appoint/Lib.hs:7:1: warning:',
\ ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’',
\ ' Use -v to see a list of the files searched for.',
\ ])
+
+
+Execute(The ghc handler should handle ghc 7 output):
+
+ AssertEqual
+ \ [
+ \ {'lnum': 168, 'bufnr': 47, 'vcol': 0, 'nr': -1, 'type': 'E', 'col': 1, 'text': ' parse error (possibly incorrect indentation or mismatched brackets)'},
+ \ ],
+ \ ale#handlers#HandleGhcFormat(47, [
+ \ 'src/Main.hs:168:1:',
+ \ ' parse error (possibly incorrect indentation or mismatched brackets)',
+ \ ])