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

Function decodeJSONHelpOutput

cmd/help_json_test.go:979–993  ·  view source on GitHub ↗
(t *testing.T, stdout string)

Source from the content-addressed store, hash-verified

977}
978
979func decodeJSONHelpOutput(t *testing.T, stdout string) jsonHelpOutputForTest {
980 t.Helper()
981
982 var got jsonHelpOutputForTest
983 if err := json.Unmarshal([]byte(stdout), &got); err != nil {
984 t.Fatalf("decode JSON help output: %v\noutput: %s", err, stdout)
985 }
986 if got.Warnings == nil {
987 t.Fatalf("warnings = nil, want empty array")
988 }
989 if len(got.Warnings) != 0 {
990 t.Fatalf("warnings = %+v, want empty", got.Warnings)
991 }
992 return got
993}
994
995func assertJSONHelpResultPaths(t *testing.T, got jsonHelpOutputForTest, want []string) {
996 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected