MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / TestHelpCmd_FormatTextEquivalent

Function TestHelpCmd_FormatTextEquivalent

cmd/pad/help_cmdhelp_test.go:92–104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

90}
91
92func 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
106func TestHelpCmd_FormatJSONEmits(t *testing.T) {
107 // TASK-934 replaced the stub with a real emitter. Verify --format json

Callers

nothing calls this directly

Calls 2

runHelpFunction · 0.85
FatalfMethod · 0.80

Tested by

no test coverage detected