diff --git a/lychee-bin/tests/cli.rs b/lychee-bin/tests/cli.rs index c8219d58a5..22b4f938f3 100644 --- a/lychee-bin/tests/cli.rs +++ b/lychee-bin/tests/cli.rs @@ -411,6 +411,26 @@ mod cli { .stdout(contains("2 Errors")); } + #[test] + fn test_resolve_paths_from_root_path_and_base_url() { + let mut cmd = main_command(); + let dir = fixtures_path(); + + cmd.arg("--offline") + .arg("--include-fragments") + .arg("--root-path") + .arg("/resolve_paths_from_root_path") + .arg("--base") + .arg(&dir) + .arg(dir.join("resolve_paths_from_root_path").join("nested").join("index.html")) + .env_clear() + .assert() + .failure() + .stdout(contains("7 Total")) + .stdout(contains("5 OK")) + .stdout(contains("2 Errors")); + } + #[test] fn test_youtube_quirk() { let url = "https://www.youtube.com/watch?v=NlKuICiT470&list=PLbWDhxwM_45mPVToqaIZNbZeIzFchsKKQ&index=7";