ADD Add invalid comment test
1 files changed, 9 insertions(+), 0 deletions(-)

M tests/snabela/test.ml
M tests/snabela/test.ml +9 -0
@@ 429,6 429,14 @@ let test_apply_fail10 =
        let ret = Snabela.apply compile kv in
        assert (ret = Error (`Missing_key ("name", 3))))
 
+let test_apply_fail11 =
+  Oth.test
+    ~name:"Apply Fail: Malformed Comment"
+    (fun _ ->
+       let template = "@The difference between a valid comment @ and premature closed is subtle@" in
+       let t = Snabela.Template.of_utf8_string template in
+       assert (t = Error (`Invalid_replacement 1)))
+
 let test_transformer1 =
   Oth.test
     ~name:"Transformer: Capitalize"

          
@@ 497,6 505,7 @@ let test =
     ; test_apply_fail8
     ; test_apply_fail9
     ; test_apply_fail10
+    ; test_apply_fail11
     ; test_transformer1
     ; test_transformer2
     ]