| 90 | } |
| 91 | |
| 92 | func TestHelpCmd_FormatTextEquivalent(t *testing.T) { |
| 93 | defaultOut, _, _ := runHelp(t) |
| 94 | explicitOut, _, err := runHelp(t, "--format", "text") |
| 95 | if err != nil { |
| 96 | t.Fatalf("pad help --format text: unexpected error: %v", err) |
| 97 | } |
| 98 | if defaultOut == "" || explicitOut == "" { |
| 99 | t.Fatalf("expected non-empty output from both default and --format=text") |
| 100 | } |
| 101 | if defaultOut != explicitOut { |
| 102 | t.Errorf("expected --format=text to match default output exactly\n--- default ---\n%s\n--- explicit ---\n%s", defaultOut, explicitOut) |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | func TestHelpCmd_FormatJSONEmits(t *testing.T) { |
| 107 | // TASK-934 replaced the stub with a real emitter. Verify --format json |