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

Function TestHelpCmd_CapabilitiesExactString

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

Source from the content-addressed store, hash-verified

203}
204
205func TestHelpCmd_CapabilitiesExactString(t *testing.T) {
206 out, _, err := runHelp(t, "--capabilities")
207 if err != nil {
208 t.Fatalf("--capabilities: unexpected error: %v", err)
209 }
210 // Per spec §8: single line, exact format. The trailing newline
211 // comes from fmt.Fprintln. Anything else (extra whitespace,
212 // stray prose, multiple lines) breaks the contract.
213 want := "cmdhelp/0.1: text, md, json, llm\n"
214 if out != want {
215 t.Errorf("--capabilities output mismatch:\n got: %q\nwant: %q", out, want)
216 }
217}
218
219func TestHelpCmd_CapabilitiesShortCircuits(t *testing.T) {
220 // --capabilities MUST take precedence over --format / --depth /

Callers

nothing calls this directly

Calls 2

runHelpFunction · 0.85
FatalfMethod · 0.80

Tested by

no test coverage detected