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

Function decodeRemoveOutputString

cmd/rm_test.go:81–101  ·  view source on GitHub ↗
(t *testing.T, output string)

Source from the content-addressed store, hash-verified

79}
80
81func decodeRemoveOutputString(t *testing.T, output string) removeOutput {
82 t.Helper()
83
84 var got removeOutput
85 if err := json.Unmarshal([]byte(output), &got); err != nil {
86 t.Fatalf("decode JSON output: %v\noutput: %s", err, output)
87 }
88 if got.Input == nil {
89 t.Fatalf("input = nil, want empty object")
90 }
91 if len(got.Input) != 0 {
92 t.Fatalf("input = %+v, want empty object", got.Input)
93 }
94 if got.Warnings == nil {
95 t.Fatalf("warnings = nil, want empty array")
96 }
97 if len(got.Warnings) != 0 {
98 t.Fatalf("warnings = %+v, want empty", got.Warnings)
99 }
100 return got
101}
102
103func rmNonEmptyFolderResult() *files.ListFolderResult {
104 return &files.ListFolderResult{

Callers 2

decodeRemoveOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected