diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-26 03:17:08 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-26 03:17:08 +0900 |
| commit | cc07b5abb83a40d678401c335bdc49bb81b72c5f (patch) | |
| tree | fd8b83b5777b2698ba11a8a0dd1fb4fa1a85994f /crates/shirabe/src | |
| parent | b8050d0f9af177d4c93aa096df7f759d027a0e66 (diff) | |
| download | php-shirabe-cc07b5abb83a40d678401c335bdc49bb81b72c5f.tar.gz php-shirabe-cc07b5abb83a40d678401c335bdc49bb81b72c5f.tar.zst php-shirabe-cc07b5abb83a40d678401c335bdc49bb81b72c5f.zip | |
test(cli): force --no-interaction so init does not hang under a TTY
The cli_tests suite runs the real CLI; under a TTY Composer's do_run logic
keeps interaction enabled, so `init` blocks on stdin. Holding the #[serial]
mutex while blocked made later tests (e.g. audit) appear to time out.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src')
| -rw-r--r-- | crates/shirabe/src/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/shirabe/src/lib.rs b/crates/shirabe/src/lib.rs index 2de7f29..7c4fc96 100644 --- a/crates/shirabe/src/lib.rs +++ b/crates/shirabe/src/lib.rs @@ -145,8 +145,11 @@ mod cli_tests { std::env::remove_var("LINES"); } + // Force non-interactive: the suite must not block on a prompt (e.g. `init`) when run under + // a TTY, where Composer's own logic would otherwise keep interaction enabled. let mut argv = vec!["composer".to_string()]; argv.extend(args.iter().map(|s| s.to_string())); + argv.push("--no-interaction".to_string()); let result = catch_unwind(AssertUnwindSafe(|| crate::run(argv))); if let Some(orig) = original { |
