From 343e6fcc129b47768059860e26ef6372170794b2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 04:11:50 +0900 Subject: test: port MetapackageInstallerTest and SelfUpdate/Status/Home command stubs MetapackageInstaller install/uninstall verified against a real InstalledArrayRepository; update reaches version_compare (todo!()) and is ignored. The command tests need the ApplicationTester harness (stubbed). Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/tests/command/home_command_test.rs | 6 ++++++ crates/shirabe/tests/command/main.rs | 3 +++ .../tests/command/self_update_command_test.rs | 24 ++++++++++++++++++++++ .../shirabe/tests/command/status_command_test.rs | 12 +++++++++++ 4 files changed, 45 insertions(+) (limited to 'crates/shirabe/tests/command') diff --git a/crates/shirabe/tests/command/home_command_test.rs b/crates/shirabe/tests/command/home_command_test.rs index 0cbe03d..0bb4357 100644 --- a/crates/shirabe/tests/command/home_command_test.rs +++ b/crates/shirabe/tests/command/home_command_test.rs @@ -1 +1,7 @@ //! ref: composer/tests/Composer/Test/Command/HomeCommandTest.php + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_home_command_with_show_flag() { + todo!() +} diff --git a/crates/shirabe/tests/command/main.rs b/crates/shirabe/tests/command/main.rs index 381649a..195f570 100644 --- a/crates/shirabe/tests/command/main.rs +++ b/crates/shirabe/tests/command/main.rs @@ -3,4 +3,7 @@ mod audit_command_test; mod clear_cache_command_test; mod diagnose_command_test; mod exec_command_test; +mod home_command_test; mod reinstall_command_test; +mod self_update_command_test; +mod status_command_test; diff --git a/crates/shirabe/tests/command/self_update_command_test.rs b/crates/shirabe/tests/command/self_update_command_test.rs index 6623853..a4b7358 100644 --- a/crates/shirabe/tests/command/self_update_command_test.rs +++ b/crates/shirabe/tests/command/self_update_command_test.rs @@ -1 +1,25 @@ //! ref: composer/tests/Composer/Test/Command/SelfUpdateCommandTest.php + +#[test] +#[ignore = "requires the ApplicationTester harness, which is not yet ported"] +fn test_successful_update() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester harness, which is not yet ported"] +fn test_update_to_specific_version() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester harness, which is not yet ported"] +fn test_update_with_invalid_option_throws_exception() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester harness, which is not yet ported"] +fn test_update_to_different_channel() { + todo!() +} diff --git a/crates/shirabe/tests/command/status_command_test.rs b/crates/shirabe/tests/command/status_command_test.rs index 8dec3eb..6b8dcf6 100644 --- a/crates/shirabe/tests/command/status_command_test.rs +++ b/crates/shirabe/tests/command/status_command_test.rs @@ -1 +1,13 @@ //! ref: composer/tests/Composer/Test/Command/StatusCommandTest.php + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_no_local_changes() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_locally_modified_packages() { + todo!() +} -- cgit v1.3.1