aboutsummaryrefslogtreecommitdiff
path: root/test/syntax.ml
diff options
context:
space:
mode:
authorChimrod <>2024-01-20 21:59:10 +0100
committerChimrod <>2024-01-20 21:59:10 +0100
commit8a02bbbd2bf42e2152faca16b95152744ef416d0 (patch)
tree0eb17c69ba9db26a1b45357d3f3a5bd5cb443da1 /test/syntax.ml
parent2abe1fae40a1c65ff66ad51c98d92be9c7d9d8a5 (diff)
Reject a syntax which was incorrectly accepted
Diffstat (limited to 'test/syntax.ml')
-rw-r--r--test/syntax.ml22
1 files changed, 0 insertions, 22 deletions
diff --git a/test/syntax.ml b/test/syntax.ml
index 3b7c2f9..47f1a25 100644
--- a/test/syntax.ml
+++ b/test/syntax.ml
@@ -444,27 +444,6 @@ end |}
};
]
-let test_if2 () =
- let index = Some Ast.(Integer (_position, "0")) in
- let args = Ast.(Ident { pos = _position; name = "$ARGS"; index })
- and expr1 = Ast.(Literal (_position, [ T.Text "blockA" ]))
- and expr2 =
- Ast.(Expression (Literal (_position, [ T.Text "You are in block A" ])))
- in
- _test_instruction {| if $ARGS[0] = 'blockA':
- 'You are in block A'
-end if|}
- Ast.
- [
- If
- {
- loc = _position;
- then_ = (_position, BinaryOp (_position, Eq, args, expr1), [ expr2 ]);
- elifs = [];
- else_ = [];
- };
- ]
-
let test_if_chained () =
let value_0 = Ast.Integer (_position, "0") in
_test_instruction {| if 0:
@@ -937,7 +916,6 @@ let test =
Alcotest.test_case "Comment6" `Quick test_comment6;
Alcotest.test_case "Multiline Comment" `Quick test_long_comment;
Alcotest.test_case "If" `Quick test_if;
- Alcotest.test_case "If - end if" `Quick test_if2;
Alcotest.test_case "If_chained" `Quick test_if_chained;
Alcotest.test_case "If_equality" `Quick test_if_equality;
Alcotest.test_case "If inline" `Quick test_if_inline;