Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fixtures/LINK_PERIOD.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="https://www.example.com/smth.">link</a>
25 changes: 25 additions & 0 deletions lychee-bin/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1990,4 +1990,29 @@ mod cli {

Ok(())
}

#[test]
fn test_extract_url_ending_with_period_file() {
let test_path = fixtures_path().join("LINK_PERIOD.html");

let mut cmd = main_command();
cmd.arg("--dump")
.arg(test_path)
.assert()
.success()
.stdout(contains("https://www.example.com/smth."));
}

#[tokio::test]
async fn test_extract_url_ending_with_period_webserver() {
let mut cmd = main_command();
let body = r#"<a href="https://www.example.com/smth.">link</a>"#;
let mock_server = mock_response!(body);

cmd.arg("--dump")
.arg(mock_server.uri())
.assert()
.success()
.stdout(contains("https://www.example.com/smth."));
}
}
Loading