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

Function TestPutStdin_RejectsRecursive

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

Source from the content-addressed store, hash-verified

41}
42
43func TestPutStdin_RejectsRecursive(t *testing.T) {
44 cmd := testPutCmdWithStdin(strings.NewReader("data"))
45 _ = cmd.Flags().Set("recursive", "true")
46 err := put(cmd, []string{"-", "/file.txt"})
47 if err == nil {
48 t.Fatal("expected error for put - --recursive")
49 }
50 if !strings.Contains(err.Error(), "--recursive") {
51 t.Errorf("error = %q, want mention of --recursive", err.Error())
52 }
53}
54
55func TestPutStdin_RejectsDirectoryStyleTarget(t *testing.T) {
56 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