MCPcopy
hub / github.com/urfave/cli / TestCommandHelpSuggest

Function TestCommandHelpSuggest

help_test.go:2064–2078  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2062}
2063
2064func TestCommandHelpSuggest(t *testing.T) {
2065 cmd := &Command{
2066 Suggest: true,
2067 Commands: []*Command{
2068 {
2069 Name: "putz",
2070 },
2071 },
2072 }
2073
2074 cmd.setupDefaults([]string{"foo"})
2075
2076 err := ShowCommandHelp(context.Background(), cmd, "put")
2077 assert.ErrorContains(t, err, "No help topic for 'put'. putz")
2078}
2079
2080func TestWrapLine(t *testing.T) {
2081 assert.Equal(t, " ", wrapLine(" ", 0, 3, " "))

Callers

nothing calls this directly

Calls 1

setupDefaultsMethod · 0.95

Tested by

no test coverage detected