aboutsummaryrefslogtreecommitdiff
path: root/test/syntax_error.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/syntax_error.ml')
-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;
] )