mirror of
https://github.com/Hopiu/lychee.git
synced 2026-04-16 03:10:58 +00:00
Add test for mailto address with query params (#655)
This commit is contained in:
parent
2e6caa512c
commit
487d88cefe
1 changed files with 16 additions and 0 deletions
|
|
@ -352,4 +352,20 @@ mod tests {
|
|||
|
||||
assert_eq!(links, expected_urls);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_email_with_query_params() {
|
||||
let input = Input {
|
||||
source: InputSource::String(
|
||||
r#"This is a mailto:user@example.com?subject=Hello link"#.to_string(),
|
||||
),
|
||||
file_type_hint: None,
|
||||
excluded_paths: None,
|
||||
};
|
||||
let links = collect(vec![input], None).await;
|
||||
|
||||
let expected_links = HashSet::from_iter([mail("user@example.com")]);
|
||||
|
||||
assert_eq!(links, expected_links);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue