summaryrefslogtreecommitdiff
path: root/test/handler/test_ghc_handler.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-13 22:47:19 +0000
committerw0rp <devw0rp@gmail.com>2017-11-13 22:47:19 +0000
commit764a33b1c9dc355f779366762db1645eda478ee4 (patch)
treeefc5d64d2730c7d8b5bab0d26d1f11391c4e7aab /test/handler/test_ghc_handler.vader
parent6c112dd1cc0225d2549f364b5e8a7693755634c2 (diff)
downloadale-764a33b1c9dc355f779366762db1645eda478ee4.zip
Fix #1124 - Handle stack-build errors with leading spaces
Diffstat (limited to 'test/handler/test_ghc_handler.vader')
-rw-r--r--test/handler/test_ghc_handler.vader22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/handler/test_ghc_handler.vader b/test/handler/test_ghc_handler.vader
index b76046ca..b47cdf67 100644
--- a/test/handler/test_ghc_handler.vader
+++ b/test/handler/test_ghc_handler.vader
@@ -76,3 +76,25 @@ Execute(The ghc handler should handle ghc 7 output):
\ ale#path#Winify('src/Main.hs') . ':94:5:Error:',
\ ' Some other error',
\ ])
+
+Execute(The ghc handler should handle stack 1.5.1 output):
+ call ale#test#SetFilename('src/Main.hs')
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 160,
+ \ 'col': 14,
+ \ 'type': 'E',
+ \ 'text': '• Expecting one fewer arguments to ‘Exp’ Expected kind ‘k0 -> *’, but ‘Exp’ has kind ‘*’ • In the type ‘Exp a’ | 160 | pattern F :: Exp a | ^^^^^',
+ \ },
+ \ ],
+ \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
+ \ ' ' . ale#path#Winify('src/Main.hs') . ':160:14: error:',
+ \ ' • Expecting one fewer arguments to ‘Exp’',
+ \ ' Expected kind ‘k0 -> *’, but ‘Exp’ has kind ‘*’',
+ \ ' • In the type ‘Exp a’',
+ \ ' |',
+ \ ' 160 | pattern F :: Exp a',
+ \ ' | ^^^^^',
+ \ ])