MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestValidateOutputFormatHonorsInheritedOutput

Function TestValidateOutputFormatHonorsInheritedOutput

cmd/output_test.go:169–180  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

167}
168
169func 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
182func TestStructuredOutputSupportDoesNotInheritFromParent(t *testing.T) {
183 root := &cobra.Command{}

Callers

nothing calls this directly

Calls 2

enableStructuredOutputFunction · 0.85
validateOutputFormatFunction · 0.85

Tested by

no test coverage detected