Fix unit tests
This commit is contained in:
parent
9720ac029c
commit
50b52ca9d5
@ -1385,16 +1385,19 @@ func TestApp_VisibleCategories(t *testing.T) {
|
||||
Category: "1",
|
||||
HelpName: "foo command1",
|
||||
Hidden: true,
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
{
|
||||
Name: "command2",
|
||||
Category: "2",
|
||||
HelpName: "foo command2",
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
{
|
||||
Name: "command3",
|
||||
Category: "3",
|
||||
HelpName: "foo command3",
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
}
|
||||
|
||||
@ -1425,17 +1428,20 @@ func TestApp_VisibleCategories(t *testing.T) {
|
||||
Category: "1",
|
||||
HelpName: "foo command1",
|
||||
Hidden: true,
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
{
|
||||
Name: "command2",
|
||||
Category: "2",
|
||||
HelpName: "foo command2",
|
||||
Hidden: true,
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
{
|
||||
Name: "command3",
|
||||
Category: "3",
|
||||
HelpName: "foo command3",
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
}
|
||||
|
||||
@ -1460,18 +1466,21 @@ func TestApp_VisibleCategories(t *testing.T) {
|
||||
Category: "1",
|
||||
HelpName: "foo command1",
|
||||
Hidden: true,
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
{
|
||||
Name: "command2",
|
||||
Category: "2",
|
||||
HelpName: "foo command2",
|
||||
Hidden: true,
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
{
|
||||
Name: "command3",
|
||||
Category: "3",
|
||||
HelpName: "foo command3",
|
||||
Hidden: true,
|
||||
FlagCategories: FlagCategories{},
|
||||
},
|
||||
}
|
||||
|
||||
|
5
help.go
5
help.go
@ -54,12 +54,11 @@ CATEGORY:
|
||||
{{.Category}}{{end}}{{if .Description}}
|
||||
|
||||
DESCRIPTION:
|
||||
{{.Description}}{{end}}
|
||||
|
||||
{{.Description}}{{end}}{{if .VisibleFlagCategories}}
|
||||
OPTIONS:{{range .VisibleFlagCategories}}
|
||||
{{.Name}}
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}{{end}}
|
||||
{{end}}{{end}}{{end}}
|
||||
`
|
||||
|
||||
// SubcommandHelpTemplate is the text template for the subcommand help topic.
|
||||
|
Loading…
Reference in New Issue
Block a user