diff options
Diffstat (limited to 'test')
-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 99f324a..9d51cf3 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -284,6 +284,12 @@ let unexpected_bracket () = _test_instruction {|"<<a[]]>>"|} expected; _test_instruction "'<<rand(1,2))>>'" expected +let missing_operator () = + _test_instruction {| +'' + $func('f', '') '' +|} + { level = Error; loc = _position; message = "Missing operator before text" } + let test = ( "Syntax Errors", [ @@ -308,4 +314,5 @@ let test = Alcotest.test_case "+ =" `Quick unknown_operator; Alcotest.test_case "'<<''>>'" `Quick nested_string_mess; Alcotest.test_case "a[]]" `Quick unexpected_bracket; + Alcotest.test_case "Missing +" `Quick missing_operator; ] ) |