extern crate markdown; use markdown::{mdast, to_html, to_html_with_options, to_mdast, Options}; use pretty_assertions::assert_eq; #[test] fn fuzz() -> Result<(), String> { assert_eq!( to_html("[\n~\na\n-\n\n"), "
x\n
\na\n
\nb\n
\na *
", "4-a: trailing whitespace and broken data" ); assert_eq!( to_html("_ "), "_
", "4-b: trailing whitespace and broken data (GH-13)" ); assert_eq!( to_html_with_options("a ~ ", &Options::gfm())?, "a ~
", "4-c: trailing whitespace and broken data (GH-14)" ); assert!( matches!( to_mdast("123456789. ok", &Default::default()), Ok(mdast::Node::Root(_)) ), "5: lists should support high start numbers (GH-17)" ); assert_eq!( to_html("> ```\n"), "\n", "6-a: container close after unclosed fenced code, with eol (block quote, GH-16)" ); assert_eq!( to_html("- ```\n"), "\n\n
\n
\n\n\nx
\n
``
".into()), "7: lazy container lines almost starting fenced code (GH-19)" ); Ok(()) }