diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/syntax_error.ml | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/test/syntax_error.ml b/test/syntax_error.ml index f65042a..5587908 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -248,6 +248,17 @@ let unclosed_act () =           If there are nested blocks, the error will points the highest block.";      } +let unknown_operator () = +  _test_instruction +    {| +    variable + = 1 +|} +    { +      level = Error; +      loc = _position; +      message = "Unknown operator. Did you write '+ =' instead of '+=' ?"; +    } +  let test =    ( "Syntax Errors",      [ @@ -268,4 +279,5 @@ let test =        Alcotest.test_case "Misplaced if" `Quick misplaced_if;        Alcotest.test_case "(()" `Quick unclosed_paren2;        Alcotest.test_case "act: else" `Quick unclosed_act; +      Alcotest.test_case "+ =" `Quick unknown_operator;      ] )  | 
