raw
1use crate::{ast::*, parser::parse_markdown};
2
3#[test]
4fn html_entity1() {
5 let doc = parse_markdown("&").unwrap();
6 assert_eq!(
7 doc,
8 Document {
9 blocks: vec![Block::Paragraph(vec![Inline::Text("&".to_string())]),]
10 }
11 );
12}
13
14#[test]
15fn html_entity2() {
16 let doc = parse_markdown(" ").unwrap();
17 assert_eq!(
18 doc,
19 Document {
20 blocks: vec![Block::Paragraph(vec![Inline::Text(" ".to_string())]),]
21 }
22 );
23}
24
25#[test]
26fn html_entity3() {
27 let doc = parse_markdown(" ").unwrap();
28 assert_eq!(
29 doc,
30 Document {
31 blocks: vec![Block::Paragraph(vec![Inline::Text(" ".to_string())]),]
32 }
33 );
34}
35
36#[test]
37fn html_entity4() {
38 let doc = parse_markdown("&unknownchar;").unwrap();
39 assert_eq!(
40 doc,
41 Document {
42 blocks: vec![Block::Paragraph(vec![Inline::Text(
43 "&unknownchar;".to_string()
44 )]),]
45 }
46 );
47}
48