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

Function TestJSONHelpForUnsupportedStructuredCommand

cmd/help_json_test.go:774–784  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

772}
773
774func TestJSONHelpForUnsupportedStructuredCommand(t *testing.T) {
775 stdout, _, err := executeJSONHelpTestRoot(t, []string{"login", "--help", "--output=json"})
776 if err != nil {
777 t.Fatalf("Execute returned error: %v", err)
778 }
779 got := decodeJSONHelpOutput(t, stdout)
780 login := jsonHelpManifestByPath(t, got, "login")
781 if login.SupportsStructuredOutput {
782 t.Fatal("login supports_structured_output = true, want false")
783 }
784}
785
786func TestJSONHelpPreservesTextHelpAndRootDefaultHelp(t *testing.T) {
787 stdout, stderr, err := executeJSONHelpTestRoot(t, []string{"--help"})

Callers

nothing calls this directly

Calls 3

executeJSONHelpTestRootFunction · 0.85
decodeJSONHelpOutputFunction · 0.85
jsonHelpManifestByPathFunction · 0.85

Tested by

no test coverage detected