Skip to content

Commit 70d1a81

Browse files
committed
review(round3): use production flag description; pin printInitCatalog description columns
TestSetInitUsage now registers --force with the actual production description ("Overwrite an existing .mdsmith.yml instead of leaving it unchanged") so the PrintDefaults pin matches what a real user sees, not an arbitrary stub. TestPrintInitCatalog adds description/summary assertions ("Open Knowledge Format bundle config", "Curated no-llm-tells word-lists") so removing the description column from printInitCatalog's format string would break the test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013KgrSLVGA3ioVKvpNkK9ar
1 parent 8cb1934 commit 70d1a81

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cmd/mdsmith/init_unit_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ func TestPrintInitCatalog(t *testing.T) {
2525
assert.Contains(t, out, "Starters (mdsmith init --starter <name>):")
2626
assert.Contains(t, out, "Packs (mdsmith init --add <name>):")
2727
assert.Contains(t, out, "okf")
28+
assert.Contains(t, out, "Open Knowledge Format bundle config")
2829
assert.Contains(t, out, "wordlists")
30+
assert.Contains(t, out, "Curated no-llm-tells word-lists")
2931
}
3032

3133
// --- setInitUsage ---
3234

3335
func TestSetInitUsage(t *testing.T) {
3436
var buf bytes.Buffer
3537
fs := flag.NewFlagSet("init", flag.ContinueOnError)
36-
fs.BoolVar(new(bool), "force", false, "overwrite existing .mdsmith.yml")
38+
fs.BoolVar(new(bool), "force", false, "Overwrite an existing .mdsmith.yml instead of leaving it unchanged")
3739
setInitUsage(fs, &buf)
3840
fs.Usage()
3941
out := buf.String()
@@ -43,7 +45,7 @@ func TestSetInitUsage(t *testing.T) {
4345
assert.Contains(t, out, "--force")
4446
assert.Contains(t, out, "--list")
4547
// Pins that fs.PrintDefaults() ran: description only appears via PrintDefaults, not the static header.
46-
assert.Contains(t, out, "overwrite existing .mdsmith.yml")
48+
assert.Contains(t, out, "Overwrite an existing .mdsmith.yml instead of leaving it unchanged")
4749
}
4850

4951
// --- runInit ---

0 commit comments

Comments
 (0)