diff --git a/fixtures/configs/accept.toml b/fixtures/configs/accept.toml new file mode 100644 index 0000000..6dff868 --- /dev/null +++ b/fixtures/configs/accept.toml @@ -0,0 +1 @@ +accept = [200, "203", "301..=304", 404] \ No newline at end of file diff --git a/lychee-bin/tests/cli.rs b/lychee-bin/tests/cli.rs index a21c795..e71ea95 100644 --- a/lychee-bin/tests/cli.rs +++ b/lychee-bin/tests/cli.rs @@ -653,6 +653,20 @@ mod cli { .success(); } + #[tokio::test] + async fn test_config_accept() { + let mock_server = mock_server!(StatusCode::OK); + let config = fixtures_path().join("configs").join("accept.toml"); + let mut cmd = main_command(); + cmd.arg("--config") + .arg(config) + .arg("-") + .write_stdin(mock_server.uri()) + .env_clear() + .assert() + .success(); + } + #[test] fn test_lycheeignore_file() -> Result<()> { let mut cmd = main_command();