File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ var echoCmd = &cobra.Command{
5757 Short : "Echo anything to the screen" ,
5858 Long : "an utterly useless command for testing" ,
5959 Example : "Just run cobra-test echo" ,
60+ Annotations : map [string ]string {
61+ "skills:tip:output" : "Supports JSON output via -o json." ,
62+ },
6063}
6164
6265var echoSubCmd = & cobra.Command {
Original file line number Diff line number Diff line change @@ -141,6 +141,8 @@ func TestGenSkillsDir(t *testing.T) {
141141 checkStringContains (t , echoContent , echoCmd .Long )
142142 checkStringContains (t , echoContent , echoCmd .Example )
143143 checkStringContains (t , echoContent , "boolone" )
144+ checkStringContains (t , echoContent , "### Tips" )
145+ checkStringContains (t , echoContent , "- Supports JSON output via -o json." )
144146
145147 timesRef , err := os .ReadFile (filepath .Join (refDir , "root_echo_times.md" ))
146148 if err != nil {
@@ -150,6 +152,7 @@ func TestGenSkillsDir(t *testing.T) {
150152 checkStringContains (t , timesContent , "# root echo times" )
151153 checkStringContains (t , timesContent , timesCmd .Short )
152154 checkStringContains (t , timesContent , "Options inherited from parent commands" )
155+ checkStringOmits (t , timesContent , "### Tips" )
153156}
154157
155158func TestGenSkillsDirDefaultName (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments