summaryrefslogtreecommitdiff
path: root/test/handler/test_sml_handler.vader
diff options
context:
space:
mode:
authorChuan Wei Foo <chuanwei.foo@hotmail.com>2021-11-15 19:35:45 +0800
committerGitHub <noreply@github.com>2021-11-15 20:35:45 +0900
commit01fdd8d66b9ee949747ce53ad37bc65b5df4e084 (patch)
treed60ccae246332de32f6c2beb83339653fd369d99 /test/handler/test_sml_handler.vader
parentd72a9d64ff4f9ff7fef32d180363180abf4e1f0b (diff)
downloadale-01fdd8d66b9ee949747ce53ad37bc65b5df4e084.zip
Show errors and warnings for the 'smlnj' linter (#3957)
* Show errors and warnings for the 'smlnj' linter Fixes #3953 * Change smlnj stdIn regex
Diffstat (limited to 'test/handler/test_sml_handler.vader')
-rw-r--r--test/handler/test_sml_handler.vader32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/handler/test_sml_handler.vader b/test/handler/test_sml_handler.vader
index 4e16e244..ef93cc47 100644
--- a/test/handler/test_sml_handler.vader
+++ b/test/handler/test_sml_handler.vader
@@ -85,3 +85,35 @@ Execute (Testing a warning):
\ "val f = fn : int -> int",
\ "-",
\])
+
+Execute (Testing stdIn):
+ AssertEqual [
+ \ {
+ \ 'bufnr': 42,
+ \ 'lnum': 1,
+ \ 'col': 5,
+ \ 'type': 'E',
+ \ 'text': "Error: operator and operand don't agree [overload conflict]",
+ \ },
+ \ {
+ \ 'bufnr': 42,
+ \ 'lnum': 2,
+ \ 'col': 4,
+ \ 'type': 'E',
+ \ 'text': "Error: operator and operand don't agree [overload conflict]",
+ \ },
+ \],
+ \ ale#handlers#sml#Handle(42, [
+ \ "Standard ML of New Jersey v110.79 [built: Sat Oct 26 12:27:04 2019]",
+ \ "- = stdIn:1.6-1.21 Error: operator and operand don't agree [overload conflict]",
+ \ " operator domain: [+ ty] * [+ ty]",
+ \ " operand: string * [int ty]",
+ \ " in expression:",
+ \ ' "abc" + 123',
+ \ "stdIn:2.5-2.20 Error: operator and operand don't agree [overload conflict]",
+ \ " operator domain: [+ ty] * [+ ty]",
+ \ " operand: [+ ty] * string",
+ \ " in expression:",
+ \ ' 890 + "xyz"',
+ \ "-",
+ \])