aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fuzz.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-26 13:14:15 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-26 13:14:15 +0200
commite139a804a109f1e785238f15d361ada980cca778 (patch)
tree49664656ee3e671362b4a26261d4bacf7990ce5f /tests/fuzz.rs
parentdb3c46a613a2b1c1671a38f87fdd268a12539c3f (diff)
downloadmarkdown-rs-e139a804a109f1e785238f15d361ada980cca778.tar.gz
markdown-rs-e139a804a109f1e785238f15d361ada980cca778.tar.bz2
markdown-rs-e139a804a109f1e785238f15d361ada980cca778.zip
Fix GFM autolink literals after tabs
Closes GH-18. Co-authored-by: Christian Murphy <christian.murphy.42@gmail.com>
Diffstat (limited to 'tests/fuzz.rs')
-rw-r--r--tests/fuzz.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/fuzz.rs b/tests/fuzz.rs
index 1e80701..54b4f40 100644
--- a/tests/fuzz.rs
+++ b/tests/fuzz.rs
@@ -74,5 +74,29 @@ fn fuzz() -> Result<(), String> {
"7: lazy container lines almost starting fenced code (GH-19)"
);
+ assert_eq!(
+ to_html_with_options("a\tb@c.d", &Options::gfm()),
+ Ok("<p>a\t<a href=\"mailto:b@c.d\">b@c.d</a></p>".into()),
+ "8-a: autolink literals after tabs (GH-18)"
+ );
+
+ assert_eq!(
+ to_html_with_options("aa\tb@c.d", &Options::gfm()),
+ Ok("<p>aa\t<a href=\"mailto:b@c.d\">b@c.d</a></p>".into()),
+ "8-b: autolink literals after tabs (GH-18)"
+ );
+
+ assert_eq!(
+ to_html_with_options("aaa\tb@c.d", &Options::gfm()),
+ Ok("<p>aaa\t<a href=\"mailto:b@c.d\">b@c.d</a></p>".into()),
+ "8-c: autolink literals after tabs (GH-18)"
+ );
+
+ assert_eq!(
+ to_html_with_options("aaaa\tb@c.d", &Options::gfm()),
+ Ok("<p>aaaa\t<a href=\"mailto:b@c.d\">b@c.d</a></p>".into()),
+ "8-d: autolink literals after tabs (GH-18)"
+ );
+
Ok(())
}