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.ml18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/syntax_error.ml b/test/syntax_error.ml
index d814cbe..e8d29a2 100644
--- a/test/syntax_error.ml
+++ b/test/syntax_error.ml
@@ -169,6 +169,23 @@ let comment_as_operator () =
_test_instruction "gs 'a', 'b' ! target" result;
_test_instruction "gs 'a' ! target" result
+let missing_comparable () =
+ let result =
+ {
+ level = Error;
+ loc = _position;
+ message = "Missing boolean after operator";
+ }
+ in
+ _test_instruction "1 and >= 0" result;
+ _test_instruction "1 >= and 0" result;
+ _test_instruction "1 > and 0" result;
+ _test_instruction "1 < and 0" result;
+ _test_instruction "1 or >= 0" result;
+ _test_instruction "1 >= or 0" result;
+ _test_instruction "1 <= or 0" result;
+ _test_instruction "1 = or 0" result
+
let test =
( "Syntax Errors",
[
@@ -184,4 +201,5 @@ let test =
Alcotest.test_case "Inline elif" `Quick inline_elif;
Alcotest.test_case "Unclosed block" `Quick unclosed_block;
Alcotest.test_case "Unclosed block" `Quick comment_as_operator;
+ Alcotest.test_case "Missing comparable" `Quick missing_comparable;
] )