diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/syntax_error.ml | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/test/syntax_error.ml b/test/syntax_error.ml index 66f442d..f65042a 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -234,6 +234,20 @@ iif(1,0,0 + iif(1, 1, 2)  |}      { level = Error; loc = _position; message = "Unclosed `(`" } +let unclosed_act () = +  _test_instruction {| +		act 'Smthg': +			else +			end +		end|} +    { +      level = Error; +      loc = _position; +      message = +        "A block starting with `ACT` is not closed by `END`\n\ +         If there are nested blocks, the error will points the highest block."; +    } +  let test =    ( "Syntax Errors",      [ @@ -253,4 +267,5 @@ let test =        Alcotest.test_case "Location change" `Quick location_change;        Alcotest.test_case "Misplaced if" `Quick misplaced_if;        Alcotest.test_case "(()" `Quick unclosed_paren2; +      Alcotest.test_case "act: else" `Quick unclosed_act;      ] ) | 
