(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestPutStdin_RejectsDirectoryStyleTarget(t *testing.T) { |
| 56 | cmd := testPutCmdWithStdin(strings.NewReader("data")) |
| 57 | err := put(cmd, []string{"-", "/folder/"}) |
| 58 | if err == nil { |
| 59 | t.Fatal("expected error for directory-style target") |
| 60 | } |
| 61 | if !strings.Contains(err.Error(), "directory target") { |
| 62 | t.Errorf("error = %q, want mention of directory target", err.Error()) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | func TestPutStdin_RejectsExistingFolder(t *testing.T) { |
| 67 | cmd := testPutCmdWithStdin(strings.NewReader("data")) |
nothing calls this directly
no test coverage detected