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

Function TestPutStdin_RequiresTarget

cmd/pipe_test.go:32–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestPutStdin_RequiresTarget(t *testing.T) {
33 cmd := testPutCmdWithStdin(strings.NewReader("data"))
34 err := put(cmd, []string{"-"})
35 if err == nil {
36 t.Fatal("expected error for put - without target")
37 }
38 if !strings.Contains(err.Error(), "explicit target") {
39 t.Errorf("error = %q, want mention of explicit target", err.Error())
40 }
41}
42
43func TestPutStdin_RejectsRecursive(t *testing.T) {
44 cmd := testPutCmdWithStdin(strings.NewReader("data"))

Callers

nothing calls this directly

Calls 3

testPutCmdWithStdinFunction · 0.85
putFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected