Skip to content

Commit 102c385

Browse files
panglesdjonludlam
authored andcommitted
Parser: Added test for double implicitely ended context
1 parent ea628f4 commit 102c385

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/parser/test/test.ml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4193,6 +4193,38 @@ let%expect_test _ =
41934193
(paragraph (((f.ml (1 14) (1 17)) (word foo)))))))))))))
41944194
(warnings ())) |}]
41954195

4196+
let with_shorthand_list_double_item =
4197+
test "@deprecated - foo\n- bar";
4198+
[%expect
4199+
{|
4200+
((output
4201+
(((f.ml (1 0) (2 5))
4202+
(@deprecated
4203+
((f.ml (1 12) (2 5))
4204+
(unordered light
4205+
((((f.ml (1 14) (1 17))
4206+
(paragraph (((f.ml (1 14) (1 17)) (word foo))))))
4207+
(((f.ml (2 2) (2 5)) (paragraph (((f.ml (2 2) (2 5)) (word bar)))))))))))))
4208+
(warnings ())) |}]
4209+
4210+
let double_implicitely_ended =
4211+
test "@deprecated - foo\n- bar\n\nNew paragraph";
4212+
[%expect
4213+
{|
4214+
((output
4215+
(((f.ml (1 0) (2 5))
4216+
(@deprecated
4217+
((f.ml (1 12) (2 5))
4218+
(unordered light
4219+
((((f.ml (1 14) (1 17))
4220+
(paragraph (((f.ml (1 14) (1 17)) (word foo))))))
4221+
(((f.ml (2 2) (2 5)) (paragraph (((f.ml (2 2) (2 5)) (word bar)))))))))))
4222+
((f.ml (4 0) (4 13))
4223+
(paragraph
4224+
(((f.ml (4 0) (4 3)) (word New)) ((f.ml (4 3) (4 4)) space)
4225+
((f.ml (4 4) (4 13)) (word paragraph)))))))
4226+
(warnings ())) |}]
4227+
41964228
let with_shorthand_list_after_newline =
41974229
test "@deprecated\n- foo";
41984230
[%expect

0 commit comments

Comments
 (0)