aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fuzz.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-25 18:59:31 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-25 18:59:31 +0200
commit8b41cfabde848b24fdae65d09ad961c2412e023b (patch)
tree3a02a35c6f0d9a45227b8a8a9309d3540bbb4424 /tests/fuzz.rs
parentcd782d3c3563ef711905429c6d9e1a88acf14fd7 (diff)
downloadmarkdown-rs-8b41cfabde848b24fdae65d09ad961c2412e023b.tar.gz
markdown-rs-8b41cfabde848b24fdae65d09ad961c2412e023b.tar.bz2
markdown-rs-8b41cfabde848b24fdae65d09ad961c2412e023b.zip
Fix type of `start` on list in mdast
Closes GH-17. Co-authored-by: Christian Murphy <christian.murphy.42@gmail.com>
Diffstat (limited to '')
-rw-r--r--tests/fuzz.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/fuzz.rs b/tests/fuzz.rs
index a4a6765..bb63035 100644
--- a/tests/fuzz.rs
+++ b/tests/fuzz.rs
@@ -1,5 +1,5 @@
extern crate markdown;
-use markdown::{to_html, to_html_with_options, Options};
+use markdown::{mdast, to_html, to_html_with_options, to_mdast, Options};
use pretty_assertions::assert_eq;
#[test]
@@ -39,13 +39,21 @@ fn fuzz() -> Result<(), String> {
assert_eq!(
to_html("_ "),
"<p>_</p>",
- "4-b: trailing whitespace and broken data"
+ "4-b: trailing whitespace and broken data (GH-13)"
);
assert_eq!(
to_html_with_options("a ~ ", &Options::gfm())?,
"<p>a ~</p>",
- "4-c: trailing whitespace and broken data"
+ "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)"
);
Ok(())