// Tests for HTML spec. extern crate pulldown_cmark_fork; use pulldown_cmark_fork::{Parser, html, Options}; #[test] fn html_test_1() { let original = r##"Little header "##; let expected = r##"
Little header
"##; let mut s = String::new(); html::push_html(&mut s, Parser::new(&original)); assert_eq!(expected, s); } #[test] fn html_test_2() { let original = r##"Little header "##; let expected = r##"Little header
"##; let mut s = String::new(); html::push_html(&mut s, Parser::new(&original)); assert_eq!(expected, s); } #[test] fn html_test_3() { let original = r##"Little headerUseless
?>"##; let expected = r##"Little header
Useless
?>"##; let mut s = String::new(); html::push_html(&mut s, Parser::new(&original)); assert_eq!(expected, s); } #[test] fn html_test_4() { let original = r##"Little header "##; let expected = r##"Little header
"##; let mut s = String::new(); html::push_html(&mut s, Parser::new(&original)); assert_eq!(expected, s); } #[test] fn html_test_5() { let original = r##"Little headerUseless
]]>"##; let expected = r##"Little header
Useless
]]>"##; let mut s = String::new(); html::push_html(&mut s, Parser::new(&original)); assert_eq!(expected, s); } #[test] fn html_test_6() { let original = r##"Little header "##; let expected = r##"Little header
"##; let mut s = String::new(); html::push_html(&mut s, Parser::new(&original)); assert_eq!(expected, s); } #[test] fn html_test_7() { let original = r##"Little header ----------- "##; let expected = r##"A | B |
---|---|
foo | bar |