(t *testing.T)
| 167 | } |
| 168 | |
| 169 | func TestValidateOutputFormatHonorsInheritedOutput(t *testing.T) { |
| 170 | root := &cobra.Command{} |
| 171 | root.PersistentFlags().String(outputFlag, "json", "") |
| 172 | |
| 173 | cmd := &cobra.Command{} |
| 174 | enableStructuredOutput(cmd) |
| 175 | root.AddCommand(cmd) |
| 176 | |
| 177 | if err := validateOutputFormat(cmd); err != nil { |
| 178 | t.Fatalf("validateOutputFormat returned error: %v", err) |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | func TestStructuredOutputSupportDoesNotInheritFromParent(t *testing.T) { |
| 183 | root := &cobra.Command{} |
nothing calls this directly
no test coverage detected