From 8117e5450693d19726da877bce8aacf5c7aa53af Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 25 Jun 2026 15:12:06 +0900 Subject: test: port 44 vcs/downloader/version tests using mock infra Port git, version_guesser, gitlab_driver, github_driver, and git_downloader tests using the ProcessExecutor/HttpDownloader mocks and IO/Config stubs. Fix production regex-porting bugs surfaced by the now-reachable paths: Url::sanitize and Response::find_header_value had non-delimited PCRE patterns; implement array_search_mixed non-strict branch and a datetime format mapping. Add HttpDownloader::__new_mock so mocked downloaders skip curl construction. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/tests/downloader/main.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/shirabe/tests/downloader/main.rs') diff --git a/crates/shirabe/tests/downloader/main.rs b/crates/shirabe/tests/downloader/main.rs index a2bbab4..8244010 100644 --- a/crates/shirabe/tests/downloader/main.rs +++ b/crates/shirabe/tests/downloader/main.rs @@ -2,8 +2,12 @@ mod config_stub; #[path = "../common/http_downloader_mock.rs"] mod http_downloader_mock; +#[path = "../common/io_mock.rs"] +mod io_mock; #[path = "../common/io_stub.rs"] mod io_stub; +#[path = "../common/process_executor_mock.rs"] +mod process_executor_mock; mod archive_downloader_test; mod download_manager_test; -- cgit v1.3.1