diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-19 19:41:15 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-19 19:46:21 +0900 |
| commit | 9a2cee2532e5d28d5cea5726f35ab3c7046e7c0d (patch) | |
| tree | d6d65791236f99e95879461553a12542693a5747 /crates/shirabe/tests/command/reinstall_command_test.rs | |
| parent | fe0352e2db35ed559506c2b477708180768000e8 (diff) | |
| download | php-shirabe-9a2cee2532e5d28d5cea5726f35ab3c7046e7c0d.tar.gz php-shirabe-9a2cee2532e5d28d5cea5726f35ab3c7046e7c0d.tar.zst php-shirabe-9a2cee2532e5d28d5cea5726f35ab3c7046e7c0d.zip | |
fix(root-package-loader): un-ignore 4 tests by fixing stability-flag isset() port
extract_stability_flags ported PHP's `isset($stabilityFlags[$name]) &&
$stabilityFlags[$name] > $stability` as `unwrap_or(i64::MAX) > stability`,
so the check always short-circuited to "already more unstable" and no flag
(e.g. from an explicit `*@dev` requirement) was ever recorded. Fixed using
Option::is_some_and, a direct translation of PHP's isset() && ... check.
Also fixes tests/common/test_case.rs's shared installation_manager()
helper, which built a real InstallationManager::new instead of the
__new_mock constructor (mirroring PHP's FactoryMock::createInstallationManager()),
so it always had zero installers registered and wrote install-path: null
into fixture installed.json files.
Un-ignores test_reinstall_command, test_locally_modified_packages_from_source/
_from_dist, and test_package_still_present_error_when_no_install_flag_used —
the first three were already passing (their #[ignore] reasons were stale),
the last is fixed by the test_case.rs change above.
Updates the #[ignore] reasons on installer_test.rs's three fixture-driven
integration tests to reflect their current state: the install pipeline now
runs end-to-end, but the ~189-fixture installer/ set still hits several
independent, unrelated bugs/gaps that need case-by-case triage rather than
a single fix.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/command/reinstall_command_test.rs')
| -rw-r--r-- | crates/shirabe/tests/command/reinstall_command_test.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/crates/shirabe/tests/command/reinstall_command_test.rs b/crates/shirabe/tests/command/reinstall_command_test.rs index ba3d39aa..ecd98c37 100644 --- a/crates/shirabe/tests/command/reinstall_command_test.rs +++ b/crates/shirabe/tests/command/reinstall_command_test.rs @@ -62,7 +62,6 @@ fn cases() -> Vec<(&'static str, Vec<(&'static str, PhpMixed)>, &'static str)> { #[test] #[serial] -#[ignore = "ReinstallCommand::execute defers the two InstallationManager::execute(...) calls (Phase-C: needs a &mut InstalledRepositoryInterface view of local_repo, and InstallationManager::execute is itself todo!()), so no Removing/Installing lines are emitted and the output is empty. Only the \"not installed\" case, which aborts with warnings before reaching that code, would pass"] fn test_reinstall_command() { for (label, options, expected) in cases() { let composer_json = serde_json::json!({ |
