aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/config_test.rs
AgeCommit message (Collapse)Author
2026-06-28refactor: add linternsfisis
2026-06-28test(config): port testProhibitedUrlsWarningVerifyPeernsfisis
The IOMock helper is now available, so the verify_peer/verify_peer_name SSL warning case can be exercised instead of left as todo!(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26test: un-ignore 14 tests that pass against current implementationsnsfisis
Discovered via a full --include-ignored run: these tests have real (non-stub) bodies and pass now, either because their blocker was since implemented (e.g. config_command's stream_set_blocking via libc) or the ignore was stale. Covers composer, config, forgejo_url, config_command, default_policy, transaction, installed_repository, github_driver, version_bumper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25feat(php-shim): model $_ENV/$_SERVER as OsString snapshotsnsfisis
Rework the environment shim around getenv/putenv on the real environment and $_ENV/$_SERVER as startup snapshots, all over OsString. Migrate every caller off the old server()/server_argv() helpers and force the snapshots in main() before any putenv() runs. Document the porting rules in docs/dev/env-vars-porting.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24feat(io): implement BufferIO new/get_output/set_user_inputsnsfisis
Wire StreamOutput into BufferIO::new, retrieve the stream in get_output via downcast, and set the user input stream in set_user_inputs. Add as_streamable_mut to InputInterface (and ArgvInput) for mutable streamable access, and make StringInput implement StreamableInputInterface to match PHP, where StringInput is streamable via its Input ancestor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24test: port more unimplemented testsnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22test: un-ignore tests that now passnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22test: port more test casesnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21refactor(php-shim): drop current()/key()/end() array helpersnsfisis
PHP's internal array pointer (current/key/end) has no clean Rust equivalent. Remove these todo!() shim stubs and replace each call site with direct first/last element access matching Composer's original behavior. Unblocks Config::merge of anonymous {name: false} disable entries, re-enabling test_add_packagist_repository. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(tests): expand stub macros into plain test functionsnsfisis
The per-file stub!/encode_stub!/etc. macros generated #[ignore]d test functions but obscured the individual test bodies. Expanding them inline removes the macro indirection so future ports can fill in each function directly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port remaining repository and util tests as stubsnsfisis
All ignored: Composer/Filesystem/Platform/Vcs repositories and the AuthHelper/Bitbucket/Git/Perforce/RemoteFilesystem/Svn utils mock IO/Config/HttpDownloader(curl)/ProcessExecutor or use reflection; Filesystem/ProcessExecutor/StreamContextFactory/ProxyManager need on-disk fixtures or proxy env. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(config): port ConfigTestnsfisis
testAddPackagistRepository is fully modelled but Config::merge of an anonymous {name: false} disable entry reaches current() (todo!()), so it is ignored; the remaining env-dependent / plugin-config cases are stubbed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: add empty test filesnsfisis