summaryrefslogtreecommitdiff
path: root/test/handler/test_ghc_handler.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-25 17:08:57 +0100
committerw0rp <devw0rp@gmail.com>2017-06-25 17:08:57 +0100
commit93473a410139f4c094ae491e690bb22b40648214 (patch)
tree946fdc5ecb87dcd5e351ccc5b454121797ee63f1 /test/handler/test_ghc_handler.vader
parent229a1c092a6f7d5116590bed2cf0e97ad63bbc7c (diff)
downloadale-93473a410139f4c094ae491e690bb22b40648214.zip
Fix #690 - Filter out errors from other files for Haskell
Diffstat (limited to 'test/handler/test_ghc_handler.vader')
-rw-r--r--test/handler/test_ghc_handler.vader14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/handler/test_ghc_handler.vader b/test/handler/test_ghc_handler.vader
index e8d622bb..524f08b7 100644
--- a/test/handler/test_ghc_handler.vader
+++ b/test/handler/test_ghc_handler.vader
@@ -1,4 +1,6 @@
Execute(The ghc handler should handle hdevtools output):
+ call ale#test#SetFilename('foo.hs')
+
AssertEqual
\ [
\ {
@@ -8,13 +10,15 @@ Execute(The ghc handler should handle hdevtools output):
\ 'text': '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]',
\ },
\ ],
- \ ale#handlers#haskell#HandleGHCFormat(12, [
- \ '/path/to/foo.hs:147:62: warning:',
+ \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
+ \ '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 8 output):
+ call ale#test#SetFilename('src/Appoint/Lib.hs')
+
AssertEqual
\ [
\ {
@@ -30,7 +34,7 @@ Execute(The ghc handler should handle ghc 8 output):
\ 'text': ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’ Use -v to see a list of the files searched for.',
\ },
\ ],
- \ ale#handlers#haskell#HandleGHCFormat(47, [
+ \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
\ '',
\ 'src/Appoint/Lib.hs:6:1: error:',
\ ' Failed to load interface for ‘GitHub.Data’',
@@ -42,6 +46,8 @@ Execute(The ghc handler should handle ghc 8 output):
\ ])
Execute(The ghc handler should handle ghc 7 output):
+ call ale#test#SetFilename('src/Main.hs')
+
AssertEqual
\ [
\ {
@@ -51,7 +57,7 @@ Execute(The ghc handler should handle ghc 7 output):
\ 'text': ' parse error (possibly incorrect indentation or mismatched brackets)',
\ },
\ ],
- \ ale#handlers#haskell#HandleGHCFormat(47, [
+ \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
\ 'src/Main.hs:168:1:',
\ ' parse error (possibly incorrect indentation or mismatched brackets)',
\ ])