From 3e2613f70ebdb441269556d1080a69a1f21a4f7d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 12 Aug 2026 01:20:33 +0900 Subject: test: drop stale #[ignore]s and rewrite the run-script reasons Measuring every ignored test with `cargo test --workspace --no-fail-fast -- --ignored` turned up 11 that pass today; their reasons named todo!()s and gaps that have since been implemented. The two run_script_command_test cases still fail, but not for the reason given: the user's Command class is imported and executed, and what is missing is only a way to observe it, since PhpCommandProxy::run forwards the run to the worker-side console application. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/tests/command/base_dependency_command_test.rs | 1 - crates/shirabe/tests/command/global_command_test.rs | 1 - crates/shirabe/tests/command/run_script_command_test.rs | 12 ++++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/tests/command') diff --git a/crates/shirabe/tests/command/base_dependency_command_test.rs b/crates/shirabe/tests/command/base_dependency_command_test.rs index 41ad362d..ace43ae7 100644 --- a/crates/shirabe/tests/command/base_dependency_command_test.rs +++ b/crates/shirabe/tests/command/base_dependency_command_test.rs @@ -445,7 +445,6 @@ fn test_why_command_outputs() { /// ref: BaseDependencyCommandTest::testWhyNotCommandOutputs (caseWhyNotProvider rolled in). #[test] #[serial] -#[ignore = "panics in shirabe_php_shim::runtime::trigger_error (crates/shirabe-php-shim/src/runtime.rs:435 todo!()): emitting a PHP error obeys error_reporting and the installed error handler (runtime state not modeled), reached on the `why-not` command execution path"] fn test_why_not_command_outputs() { // caseWhyNotProvider: (package, version, expected_output, expected_status_code) let cases: Vec<(&str, &str, &str, i32)> = vec![ diff --git a/crates/shirabe/tests/command/global_command_test.rs b/crates/shirabe/tests/command/global_command_test.rs index 5f0efd0f..0446a007 100644 --- a/crates/shirabe/tests/command/global_command_test.rs +++ b/crates/shirabe/tests/command/global_command_test.rs @@ -31,7 +31,6 @@ fn chdir_unique_tmp_directory() -> TempDir { #[test] #[serial] -#[ignore = "runs a composer.json script, which Application::do_run registers as a reflection-instantiated command; that registration path is todo!() at crates/shirabe/src/console/application.rs:2461 (plugin: register reflection-instantiated command on Application::add)"] fn test_global() { let _env_guard = EnvGuard; diff --git a/crates/shirabe/tests/command/run_script_command_test.rs b/crates/shirabe/tests/command/run_script_command_test.rs index 6c7f45c8..992fc6e2 100644 --- a/crates/shirabe/tests/command/run_script_command_test.rs +++ b/crates/shirabe/tests/command/run_script_command_test.rs @@ -124,7 +124,11 @@ fn test_can_define_aliases() { /// ref: RunScriptCommandTest::testExecutionOfSimpleSymfonyCommand #[test] #[serial] -#[ignore = "invoking the script name as a top-level composer command needs Application::do_run to import the user's PHP Command class as a live application command, which is a todo!() in application.rs, and the worker writes to inherited stdio the in-process application tester cannot capture"] +#[ignore = "PhpCommandProxy::run hands the whole run to the worker-side console application, so the \ + user's Command writes to the stdio the worker inherited and the in-process application \ + tester's buffer stays empty. The worker is also a per-process singleton that keeps the \ + working directory it was spawned in, so the relative psr-4 path this test's autoload \ + config produces ('./MyCommand.php') only resolves when the test runs first in the binary"] fn test_execution_of_simple_symfony_command() { let description = "Sample description for test command"; let tear_down = init_temp_composer( @@ -245,7 +249,11 @@ class MyCommand extends Command /// ref: RunScriptCommandTest::testExecutionOfSymfonyCommandWithConfiguration #[test] #[serial] -#[ignore = "invoking the script name as a top-level composer command needs Application::do_run to import the user's PHP Command class as a live application command, which is a todo!() in application.rs, and the worker writes to inherited stdio the in-process application tester cannot capture"] +#[ignore = "PhpCommandProxy::run hands the whole run to the worker-side console application, so the \ + user's Command writes to the stdio the worker inherited and the in-process application \ + tester's buffer stays empty. The worker is also a per-process singleton that keeps the \ + working directory it was spawned in, so the relative psr-4 path this test's autoload \ + config produces ('./MyCommand.php') only resolves when the test runs first in the binary"] fn test_execution_of_symfony_command_with_configuration() { let cmd_name = "custom-cmd-123"; let cmd_alias = format!("{}-alias", cmd_name); -- cgit v1.3.1-4-g156e