aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChimrod <>2023-10-05 21:29:52 +0200
committerChimrod <>2023-10-05 21:29:52 +0200
commit40f4dbe7844725e0ab07f03f25c35f55b4699b46 (patch)
tree4b5750edaa5417a262121de2633f12e57988a73d /test
parent002ec21cce78961fe5a74c8b51dae0dd55aa4457 (diff)
Two new error messages
Diffstat (limited to 'test')
-rw-r--r--test/syntax_error.ml22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/syntax_error.ml b/test/syntax_error.ml
index 2ca615f..ee39001 100644
--- a/test/syntax_error.ml
+++ b/test/syntax_error.ml
@@ -75,7 +75,7 @@ let act_no_column () =
message = "Invalid `ACT` label. You probably missed a ':'";
}
-let missing_ampersand () =
+let missing_ampersand_1 () =
_test_instruction "b = 1 a = 2"
{
level = Error;
@@ -83,6 +83,22 @@ let missing_ampersand () =
message = "Missing separator between instructions";
}
+let missing_ampersand_2 () =
+ _test_instruction "let b = 1 a = 2"
+ {
+ level = Error;
+ loc = _position;
+ message = "Missing separator between instructions";
+ }
+
+let missing_ampersand_3 () =
+ _test_instruction "set b = 1 a = 2"
+ {
+ level = Error;
+ loc = _position;
+ message = "Missing separator between instructions";
+ }
+
let test =
( "Syntax Errors",
[
@@ -90,5 +106,7 @@ let test =
Alcotest.test_case "elseif" `Quick elseif_no_column;
Alcotest.test_case "(1" `Quick unclosed_paren;
Alcotest.test_case "act 1" `Quick act_no_column;
- Alcotest.test_case "no &" `Quick missing_ampersand;
+ Alcotest.test_case "no &" `Quick missing_ampersand_1;
+ Alcotest.test_case "no &" `Quick missing_ampersand_2;
+ Alcotest.test_case "no &" `Quick missing_ampersand_3;
] )