diff options
author | Héctor Ramón Jiménez <hector0193@gmail.com> | 2018-05-12 04:16:14 +0200 |
---|---|---|
committer | Héctor Ramón Jiménez <hector0193@gmail.com> | 2018-05-12 04:16:14 +0200 |
commit | c3f61c391bd74e8feb0d7d127ba353093a61b5c7 (patch) | |
tree | 70457417383b3265807fd0ef197cb9fb7c2db0bd /test | |
parent | 089a07c6a6789770d497fe12307222e24b16bbae (diff) | |
download | ale-c3f61c391bd74e8feb0d7d127ba353093a61b5c7.zip |
Use `message` as `text` instead of `title`
`title` does not contain much information which forces to use :ALEDetail most of the time
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_elmmake_handler.vader | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/test/handler/test_elmmake_handler.vader b/test/handler/test_elmmake_handler.vader index 6d3b23ba..063c0429 100644 --- a/test/handler/test_elmmake_handler.vader +++ b/test/handler/test_elmmake_handler.vader @@ -15,8 +15,7 @@ Execute(The elm make handler should parse general problems correctly): \ { \ 'lnum': 1, \ 'type': 'E', - \ 'text': 'UNKNOWN IMPORT', - \ 'detail': "error details 1\n\nstyled details" + \ 'text': "error details\n\nstyled details" \ } \ ], \ ale_linters#elm#make#Handle(347, [ @@ -24,7 +23,7 @@ Execute(The elm make handler should parse general problems correctly): \ "type": "error", \ "path": "' . b:tmp . '/Module.elm", \ "title": "UNKNOWN IMPORT", - \ "message": ["error details 1\n\n", { "string": "styled details" }] + \ "message": ["error details\n\n", { "string": "styled details" }] \ }' \ ]) @@ -37,8 +36,7 @@ Execute(The elm make handler should parse compilation errors correctly): \ 'end_lnum': 408, \ 'end_col': 18, \ 'type': 'E', - \ 'text': 'TYPE MISMATCH', - \ 'detail': "error details 1\n\nstyled details" + \ 'text': "error details 1\n\nstyled details" \ }, \ { \ 'lnum': 406, @@ -46,8 +44,7 @@ Execute(The elm make handler should parse compilation errors correctly): \ 'end_lnum': 407, \ 'end_col': 17, \ 'type': 'E', - \ 'text': 'TYPE MISMATCH', - \ 'detail': "error details 2", + \ 'text': "error details 2", \ }, \ { \ 'lnum': 406, @@ -55,8 +52,7 @@ Execute(The elm make handler should parse compilation errors correctly): \ 'end_lnum': 406, \ 'end_col': 93, \ 'type': 'E', - \ 'text': 'TYPE MISMATCH', - \ 'detail': "error details 3", + \ 'text': "error details 3", \ }, \ ], \ ale_linters#elm#make#Handle(347, [ @@ -87,18 +83,30 @@ Execute(The elm make handler should parse compilation errors correctly): \ }' \ ]) -Execute(The elm make handler should put an error on the first line for compilation errors in imported modules): +Execute(The elm make handler should handle errors in imported modules): AssertEqual \ [ \ { \ 'lnum': 1, \ 'type': 'E', - \ 'text': 'src/Module.elm:404 - TYPE MISMATCH', - \ 'detail': "src/Module.elm:404 -------\n\nerror details\n\nstyled details" + \ 'text': "src/Module.elm - error details\n\nstyled details", + \ 'detail': "src/Module.elm ----------\n\nerror details\n\nstyled details" + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': "src/Module.elm:404 - error details\n\nstyled details", + \ 'detail': "src/Module.elm:404 ----------\n\nerror details\n\nstyled details" \ }, \ ], \ ale_linters#elm#make#Handle(347, [ \ '{ + \ "type": "error", + \ "path": "src/Module.elm", + \ "title": "UNKNOWN IMPORT", + \ "message": ["error details\n\n", { "string": "styled details" }] + \ }', + \ '{ \ "type": "compile-errors", \ "errors": [ \ { @@ -124,8 +132,7 @@ Execute(The elm make handler should put an error on the first line if a line can \ 'end_lnum': 408, \ 'end_col': 18, \ 'type': 'E', - \ 'text': 'TYPE MISMATCH', - \ 'detail': "error details 1 styled details" + \ 'text': "error details 1\n\nstyled details" \ }, \ { \ 'lnum': 1, @@ -143,13 +150,13 @@ Execute(The elm make handler should put an error on the first line if a line can \ "problems": [ \ { \ "title": "TYPE MISMATCH", - \ "message": ["error details 1 ", { "string": "styled details" }], + \ "message": ["error details 1\n\n", { "string": "styled details" }], \ "region": { "start": { "line": 404, "column": 1 }, "end": { "line": 408, "column": 18 } } \ } \ ] \ } \ ] \ }', - \ "Not JSON", - \ "Also not JSON", + \ 'Not JSON', + \ 'Also not JSON', \ ]) |