diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 10:49:28 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 10:49:28 +0200 |
commit | 246063fb7cd21a83beae5934f95b2795fb85df51 (patch) | |
tree | 5f82a11d17ea5468376693c7a0405ed71d7ae147 /tests/fuzz.rs | |
parent | 9cc1ad4a90616b7fb4ae7b425a5b9844887f4584 (diff) | |
download | markdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.tar.gz markdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.tar.bz2 markdown-rs-246063fb7cd21a83beae5934f95b2795fb85df51.zip |
Refactor to use default trait in tests
Diffstat (limited to 'tests/fuzz.rs')
-rw-r--r-- | tests/fuzz.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/tests/fuzz.rs b/tests/fuzz.rs index 819edf6..8d64ff2 100644 --- a/tests/fuzz.rs +++ b/tests/fuzz.rs @@ -1,5 +1,5 @@ extern crate markdown; -use markdown::{to_html, to_html_with_options, CompileOptions, Constructs, Options, ParseOptions}; +use markdown::{to_html, to_html_with_options, Options}; use pretty_assertions::assert_eq; #[test] @@ -13,19 +13,7 @@ fn fuzz() -> Result<(), String> { // The first link is stopped by the `+` (so it’s `a@b.c`), but the next // link overlaps it (`b.c+d@e.f`). assert_eq!( - to_html_with_options( - "a@b.c+d@e.f", - &Options { - parse: ParseOptions { - constructs: Constructs::gfm(), - ..ParseOptions::default() - }, - compile: CompileOptions { - gfm_tagfilter: true, - ..CompileOptions::default() - } - } - )?, + to_html_with_options("a@b.c+d@e.f", &Options::gfm())?, "<p><a href=\"mailto:a@b.c\">a@b.c</a><a href=\"mailto:+d@e.f\">+d@e.f</a></p>", "2: gfm: email autolink literals running into each other" ); |