mirror of
https://github.com/Hopiu/lychee.git
synced 2026-05-23 12:55:50 +00:00
Add test
This commit is contained in:
parent
03f5df91cd
commit
82652a69d5
1 changed files with 19 additions and 0 deletions
|
|
@ -148,6 +148,25 @@ mod cli {
|
|||
.stdout(contains("Excluded.........1"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_resolve_paths() {
|
||||
let mut cmd = main_command();
|
||||
let offline_dir = fixtures_path().join("offline");
|
||||
|
||||
// Exclude file link because it doesn't exist on the filesystem.
|
||||
// (File URIs are absolute paths, which we don't have.)
|
||||
// Nevertheless, the `file` scheme should be recognized.
|
||||
cmd.arg("--offline")
|
||||
.arg("--base")
|
||||
.arg(&offline_dir)
|
||||
.arg(&offline_dir.join("index.html"))
|
||||
.env_clear()
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(contains("Total............2"))
|
||||
.stdout(contains("Successful.......2"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_quirks() -> Result<()> {
|
||||
test_json_output!(
|
||||
|
|
|
|||
Loading…
Reference in a new issue