@@ -48,50 +48,4 @@ mod unit_tests {
4848 let doc = parsing:: parse_markdown ( markdown, PathBuf :: from ( "test.md" ) ) ;
4949 assert_yaml_snapshot ! ( name, doc. content) ;
5050 }
51-
52- #[ test]
53- fn test_simple_bullet_list_properties ( ) {
54- use std:: path:: PathBuf ;
55- let markdown = "- First item\n - Second item\n - Third item" ;
56- let doc = parsing:: parse_markdown ( markdown, PathBuf :: from ( "test.md" ) ) ;
57-
58- assert_eq ! ( doc. content. len( ) , 1 ) ;
59- if let ContentBlock :: BulletList { items } = & doc. content [ 0 ] {
60- assert_eq ! ( items. len( ) , 3 ) ;
61- // Note: pulldown-cmark processes items in reverse document order
62- assert_eq ! ( items[ 0 ] . content, "Third item" ) ;
63- assert_eq ! ( items[ 0 ] . level, 0 ) ;
64- assert_eq ! ( items[ 1 ] . content, "Second item" ) ;
65- assert_eq ! ( items[ 2 ] . content, "First item" ) ;
66- } else {
67- panic ! ( "Expected BulletList block" ) ;
68- }
69- }
70-
71- #[ test]
72- fn test_nested_bullet_list_properties ( ) {
73- use std:: path:: PathBuf ;
74- let markdown = "- Parent item\n - Child item\n - Another child\n - Second parent" ;
75- let doc = parsing:: parse_markdown ( markdown, PathBuf :: from ( "test.md" ) ) ;
76-
77- assert_eq ! ( doc. content. len( ) , 1 ) ;
78- if let ContentBlock :: BulletList { items } = & doc. content [ 0 ] {
79- assert_eq ! ( items. len( ) , 2 ) ;
80- // Note: pulldown-cmark processes items in reverse document order
81- // Second parent comes first
82- assert_eq ! ( items[ 0 ] . content, "Second parent" ) ;
83- assert_eq ! ( items[ 0 ] . level, 0 ) ;
84- assert_eq ! ( items[ 0 ] . children. len( ) , 0 ) ;
85-
86- // First parent has children
87- assert_eq ! ( items[ 1 ] . content, "Parent item" ) ;
88- assert_eq ! ( items[ 1 ] . level, 0 ) ;
89- assert_eq ! ( items[ 1 ] . children. len( ) , 2 ) ;
90- assert_eq ! ( items[ 1 ] . children[ 0 ] . content, "Another child" ) ;
91- assert_eq ! ( items[ 1 ] . children[ 0 ] . level, 1 ) ;
92- assert_eq ! ( items[ 1 ] . children[ 1 ] . content, "Child item" ) ;
93- } else {
94- panic ! ( "Expected BulletList block" ) ;
95- }
96- }
9751}
0 commit comments