(t *testing.T)
| 41 | } |
| 42 | |
| 43 | func 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 | |
| 55 | func TestPutStdin_RejectsDirectoryStyleTarget(t *testing.T) { |
| 56 | cmd := testPutCmdWithStdin(strings.NewReader("data")) |
nothing calls this directly
no test coverage detected