From cc07b5abb83a40d678401c335bdc49bb81b72c5f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 26 Jun 2026 03:17:08 +0900 Subject: 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) --- crates/shirabe/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates') 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 { -- cgit v1.3.1