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/run_script_command_test.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/tests/command/run_script_command_test.rs') 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