From b07f3a9f51d7ce5ea8ee4dc45da7fe9a55b7f1d4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 05:05:08 +0900 Subject: test: port Auditor/JsonConfigSource/AutoloadGenerator as stubs All ignored: Auditor mocks HttpDownloader and parses constraints (look-around regex); JsonConfigSource uses JsonManipulator (addcslashes todo!()); the AutoloadGenerator cases are fixture/mocked-installer integration. Wires up the config test target. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/tests/advisory/auditor_test.rs | 18 ++++++++++++++++++ crates/shirabe/tests/advisory/main.rs | 1 + 2 files changed, 19 insertions(+) (limited to 'crates/shirabe/tests/advisory') diff --git a/crates/shirabe/tests/advisory/auditor_test.rs b/crates/shirabe/tests/advisory/auditor_test.rs index 8c6fafe..28d2600 100644 --- a/crates/shirabe/tests/advisory/auditor_test.rs +++ b/crates/shirabe/tests/advisory/auditor_test.rs @@ -1 +1,19 @@ //! ref: composer/tests/Composer/Test/Advisory/AuditorTest.php + +// These run the Auditor against a mocked HttpDownloader/IO and packages built from version +// constraints (parsed via a look-around regex the regex crate cannot compile). +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "not yet ported (Auditor with mocked HttpDownloader/IO; constraint parsing uses a look-around regex)"] + fn $name() { + todo!() + } + }; +} + +stub!(test_audit); +stub!(test_audit_with_ignore); +stub!(test_audit_with_ignore_unreachable); +stub!(test_audit_with_ignore_severity); +stub!(test_needs_complete_advisory_load); diff --git a/crates/shirabe/tests/advisory/main.rs b/crates/shirabe/tests/advisory/main.rs index 357eff7..e0b920d 100644 --- a/crates/shirabe/tests/advisory/main.rs +++ b/crates/shirabe/tests/advisory/main.rs @@ -1 +1,2 @@ mod audit_config_test; +mod auditor_test; -- cgit v1.3.1