diff options
author | Chimrod <> | 2024-09-13 09:25:38 +0200 |
---|---|---|
committer | Chimrod <> | 2024-09-13 09:25:38 +0200 |
commit | 8b4eb01afa698dd1e512f7a83fb761bfb146fdf7 (patch) | |
tree | 5c85e5f4d011a895955d8516f0cdb195acf82f24 /test/syntax_error.ml | |
parent | 692d66ba7eb0ff55a46b68601b7cd81f825653cb (diff) |
Added a syntax check in the comments
Diffstat (limited to 'test/syntax_error.ml')
-rw-r--r-- | test/syntax_error.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/syntax_error.ml b/test/syntax_error.ml index 2187e89..b92cf28 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -94,6 +94,12 @@ let unclose_comment () = _test_instruction {| ! that's it|} { level = Error; loc = _position; message = "Unclosed string" } +(* Same but with nested string *) + +let unclose_comment2 () = + _test_instruction {| !{ that's it }|} + { level = Error; loc = _position; message = "Unclosed string" } + let syntax_error () = _test_instruction {|*clr $ cla|} { level = Error; loc = _position; message = "Unexpected character \"\"" } @@ -275,6 +281,7 @@ let test = Alcotest.test_case "act 1" `Quick act_no_column; Alcotest.test_case "no &" `Quick missing_ampersand; Alcotest.test_case "unclose_comment" `Quick unclose_comment; + Alcotest.test_case "unclose_comment2" `Quick unclose_comment2; Alcotest.test_case "Syntax error $" `Quick syntax_error; Alcotest.test_case "Missing operand" `Quick missing_operand; Alcotest.test_case "Unknown function" `Quick unknow_function; |