diff --git a/lychee-bin/tests/cli.rs b/lychee-bin/tests/cli.rs index 6d0819b..a0681bf 100644 --- a/lychee-bin/tests/cli.rs +++ b/lychee-bin/tests/cli.rs @@ -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!(