From f7630499233c791feaf305f971d3753caf56dc77 Mon Sep 17 00:00:00 2001 From: altair823 Date: Wed, 27 May 2026 15:47:55 +0000 Subject: [PATCH] test(cli): assert 'code' in search --help output (Bug #7 regression pin) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why: Step 2 의 doc-comment edit 가 향후 누군가 value list 를 재정렬 하거나 alias section 으로 분리할 때 silently 사라질 risk. clap 의 --help 렌더링 가 doc-comment 의 free-form text 라 grep-only smoke 가 유일한 검출 수단. Change: 신규 test file (kebab-cli convention `cli_*` prefix 답습). CARGO_BIN_EXE_kebab 으로 fresh binary 실행, stdout 의 `code` substring assert. spec §4.4 의 acceptance row 1:1 mapping. Refs: docs/superpowers/specs/2026-05-27-v0.20-sub1-bugfix2-spec.md §4.4 / §5 (acceptance row 4). Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/kebab-cli/tests/cli_help_smoke.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 crates/kebab-cli/tests/cli_help_smoke.rs diff --git a/crates/kebab-cli/tests/cli_help_smoke.rs b/crates/kebab-cli/tests/cli_help_smoke.rs new file mode 100644 index 0000000..4cc24f3 --- /dev/null +++ b/crates/kebab-cli/tests/cli_help_smoke.rs @@ -0,0 +1,17 @@ +// crates/kebab-cli/tests/cli_help_smoke.rs +// +// Regression pin — `kebab search --help` 의 `--media` value list 가 +// `code` 를 노출. Bug #7 (v0.20.0 bugfix round 2 spec §4.4). + +#[test] +fn search_help_lists_code_in_media_values() { + let out = std::process::Command::new(env!("CARGO_BIN_EXE_kebab")) + .args(["search", "--help"]) + .output() + .expect("kebab search --help"); + let stdout = String::from_utf8_lossy(&out.stdout); + assert!( + stdout.contains("`code`"), + "search --help must list 'code' as accepted --media value; stdout = {stdout}" + ); +}