(t *testing.T)
| 2156 | } |
| 2157 | |
| 2158 | func TestHash_ReturnsErrorGivenReadErrorOnPipe(t *testing.T) { |
| 2159 | t.Parallel() |
| 2160 | brokenReader := iotest.ErrReader(errors.New("oh no")) |
| 2161 | _, err := script.NewPipe().WithReader(brokenReader).Hash(sha256.New()) |
| 2162 | if err == nil { |
| 2163 | t.Fatal(nil) |
| 2164 | } |
| 2165 | } |
| 2166 | |
| 2167 | func TestHashSums_OutputsEmptyStringForFileThatCannotBeHashed(t *testing.T) { |
| 2168 | got, err := script.Echo("file_does_not_exist.txt").HashSums(sha256.New()).String() |
nothing calls this directly
no test coverage detected
searching dependent graphs…