From 4f863f91d50c12c376f31e540a83ca9bd47d49f3 Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Tue, 2 May 2023 23:11:31 +0200 Subject: [PATCH] block: add test parse_description_list_empty --- src/block.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/block.rs b/src/block.rs index cc4f6af..c4b921c 100644 --- a/src/block.rs +++ b/src/block.rs @@ -2213,6 +2213,38 @@ mod test { ); } + #[test] + fn parse_description_list_empty() { + test_parse!( + ":\n", + ( + Enter(Container(List { + kind: ListKind { + ty: Description, + tight: true, + }, + marker: ":", + })), + ":" + ), + (Enter(Leaf(DescriptionTerm)), ""), + (Exit(Leaf(DescriptionTerm)), ""), + (Enter(Container(ListItem(ListItemKind::Description))), ":"), + (Atom(Blankline), "\n"), + (Exit(Container(ListItem(ListItemKind::Description))), ":"), + ( + Exit(Container(List { + kind: ListKind { + ty: Description, + tight: true, + }, + marker: ":", + })), + ":" + ), + ); + } + #[test] fn parse_table() { test_parse!(