From 4d9e3dd6176a0cd2cc5e158b044beeb7b3de21be Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 12 Jul 2026 01:28:17 +0900 Subject: test(util): port remaining todo!() tests in util test suite Implement previously-todo!() tests in auth_helper_test.rs, process_executor_test.rs, remote_filesystem_test.rs, and stream_context_factory_test.rs by porting the corresponding PHPUnit test methods. Extend IOStub with writeRaw/setAuthentication call tracking and askAndValidate/getAuthentication overrides to model the PHPUnit mocks these tests rely on, deduping the resulting call-recording fields into a small generic CallRecorder helper instead of repeating the same RefCell> push/borrow().clone() boilerplate five times. testStoreAuthWithPromptInvalidAnswer and testPromptAuthIfNeededMultipleBitbucketDownloads had initially lost the ported PHPUnit mock's argument/call-count assertions (askAndValidate's exact prompt string, and hasAuthentication/getAuthentication's exactly(2) call counts), silently narrowing what the tests verify; IOStub now records these calls and the tests assert on them, matching upstream. Tests left unportable (PHP set_error_handler machinery, closures in data providers, network/subclass-mock dependencies, etc.) keep #[ignore] with a single // TODO(phase-d) reason recorded in the function body. Co-Authored-By: Claude Sonnet 5 --- crates/shirabe/src/util/auth_helper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src') diff --git a/crates/shirabe/src/util/auth_helper.rs b/crates/shirabe/src/util/auth_helper.rs index 13199e9c..1e997fd9 100644 --- a/crates/shirabe/src/util/auth_helper.rs +++ b/crates/shirabe/src/util/auth_helper.rs @@ -33,7 +33,7 @@ pub struct PromptAuthResult { pub store_auth: StoreAuth, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub enum StoreAuth { Bool(bool), Prompt, -- cgit v1.3.1