diff options
Diffstat (limited to 'test/syntax.ml')
-rw-r--r-- | test/syntax.ml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/syntax.ml b/test/syntax.ml index e81bf3d..126d323 100644 --- a/test/syntax.ml +++ b/test/syntax.ml @@ -48,6 +48,14 @@ let test_empty_location () = Alcotest.(check' location ~msg ~expected ~actual) +let test_location_without_space () = + let expected = (_position, []) + and actual = get_location @@ parse {|#Location +------- |} + and msg = "Empty location" in + + Alcotest.(check' location ~msg ~expected ~actual) + let test_location_without_database () = let expected = (_position, []) and actual = get_location @@ parse {|# $Location @@ -855,6 +863,7 @@ let test = ( "Syntax", [ Alcotest.test_case "Location" `Quick test_empty_location; + Alcotest.test_case "Location" `Quick test_location_without_space; Alcotest.test_case "Location" `Quick test_location_without_database; Alcotest.test_case " Numeric expression" `Quick test_numeric_expression; Alcotest.test_case "-Numeric expression" `Quick |