summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-05-15 19:57:50 +0100
committerGitHub <noreply@github.com>2017-05-15 19:57:50 +0100
commit113f53a5d201af79027d9d5a87e28fc45bc1e60f (patch)
treead8beb01dda1bb5b56a6881bfd65c3ef3d3dd6e3 /test
parentd4466d4be744d7723dc740b29faded1d685f091d (diff)
parent3f33dc7d9832b7aed085d44b8ef76fd1c1eb90a5 (diff)
downloadale-113f53a5d201af79027d9d5a87e28fc45bc1e60f.zip
Merge pull request #496 from wizzup/haskell-ghc-mod
Haskell: new ghc-mod linter
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_ghc_mod_handler.vader27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/handler/test_ghc_mod_handler.vader b/test/handler/test_ghc_mod_handler.vader
new file mode 100644
index 00000000..f9b44b33
--- /dev/null
+++ b/test/handler/test_ghc_mod_handler.vader
@@ -0,0 +1,27 @@
+Execute(HandleGhcFormat should handle ghc-mod problems):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 2,
+ \ 'col': 1,
+ \ 'type': 'E',
+ \ 'text': 'Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.',
+ \ },
+ \ {
+ \ 'lnum': 2,
+ \ 'col': 1,
+ \ 'type': 'E',
+ \ 'text': ' Suggestion: Use camelCaseFound: my_variable = ...Why not: myVariable = ...',
+ \ },
+ \ {
+ \ 'lnum': 6,
+ \ 'col': 1,
+ \ 'type': 'E',
+ \ 'text': ' Warning: Eta reduceFound: myFunc x = succ xWhy not: myFunc = succ',
+ \ },
+ \ ],
+ \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
+ \ 'check1.hs:2:1:Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.',
+ \ 'check2.hs:2:1: Suggestion: Use camelCaseFound: my_variable = ...Why not: myVariable = ...',
+ \ 'check2.hs:6:1: Warning: Eta reduceFound: myFunc x = succ xWhy not: myFunc = succ',
+ \ ])