aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-24 21:38:53 +0900
committernsfisis <nsfisis@gmail.com>2026-06-24 21:40:49 +0900
commit7f810b1bb288445ee5376fada752e84ecb1ce211 (patch)
tree631ec748f14757d314baba704c6c175183ed096a /crates/shirabe/tests
parenta8f115666344abe3b606a4a65595ca301e7ac08a (diff)
downloadphp-shirabe-7f810b1bb288445ee5376fada752e84ecb1ce211.tar.gz
php-shirabe-7f810b1bb288445ee5376fada752e84ecb1ce211.tar.zst
php-shirabe-7f810b1bb288445ee5376fada752e84ecb1ce211.zip
feat(process): wire execute output handling to a callback model
Replace the Option<&mut PhpMixed> output plumbing with the IntoExecOutput trait modelling each PHP `$output` case (forward, capture-to-buffer, discard, callback). This lets do_execute pass a real output handler to Process::run, captures output back via get_output, and lets Svn pass its streaming filter handler through execute instead of skipping it.
Diffstat (limited to 'crates/shirabe/tests')
-rw-r--r--crates/shirabe/tests/platform/hhvm_detector_test.rs4
-rw-r--r--crates/shirabe/tests/util/process_executor_test.rs2
2 files changed, 2 insertions, 4 deletions
diff --git a/crates/shirabe/tests/platform/hhvm_detector_test.rs b/crates/shirabe/tests/platform/hhvm_detector_test.rs
index 72fd68d..5bf96d2 100644
--- a/crates/shirabe/tests/platform/hhvm_detector_test.rs
+++ b/crates/shirabe/tests/platform/hhvm_detector_test.rs
@@ -57,9 +57,7 @@ fn test_hhvm_version_when_executing_in_php() {
"{} --php -d hhvm.jit=0 -r \"echo HHVM_VERSION;\" 2>/dev/null",
ProcessExecutor::escape(&hhvm)
);
- let exit_code = process
- .execute(cmd.as_str(), Some(&mut version), None)
- .unwrap();
+ let exit_code = process.execute(cmd.as_str(), &mut version, None).unwrap();
assert_eq!(0, exit_code);
let version = version
diff --git a/crates/shirabe/tests/util/process_executor_test.rs b/crates/shirabe/tests/util/process_executor_test.rs
index 3ee4912..ba3177f 100644
--- a/crates/shirabe/tests/util/process_executor_test.rs
+++ b/crates/shirabe/tests/util/process_executor_test.rs
@@ -152,7 +152,7 @@ fn test_console_io_does_not_format_symfony_console_style() {
process
.execute(
r#"php -ddisplay_errors=0 -derror_reporting=0 -r "echo '<error>foo</error>'.PHP_EOL;""#,
- (),
+ ProcessExecutor::FORWARD_OUTPUT,
None,
)
.unwrap();