MCPcopy
hub / github.com/cli/cli / TestGenManAliases

Function TestGenManAliases

internal/docs/man_test.go:101–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestGenManAliases(t *testing.T) {
102 buf := new(bytes.Buffer)
103 header := &GenManHeader{}
104 if err := renderMan(aliasCmd, header, buf); err != nil {
105 t.Fatal(err)
106 }
107
108 output := buf.String()
109
110 checkStringContains(t, output, translate(aliasCmd.Name()))
111 checkStringContains(t, output, "ALIASES")
112 checkStringContains(t, output, "foo")
113 checkStringContains(t, output, "yoo")
114}
115
116func TestGenManJSONFields(t *testing.T) {
117 buf := new(bytes.Buffer)

Callers

nothing calls this directly

Calls 5

renderManFunction · 0.85
checkStringContainsFunction · 0.85
translateFunction · 0.85
NameMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected