From 166ffdefbcf55ddc709ab2ab197c83af51236e05 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Mon, 24 Mar 2025 15:01:18 +0100 Subject: Added a new specific error message --- test/syntax_error.ml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') 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 {|"<>"|} expected; _test_instruction "'<>'" 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; ] ) -- cgit v1.2.3