MCPcopy Index your code
hub / github.com/bitfield/script / TestHashSums_OutputsEmptyStringForFileThatCannotBeHashed

Function TestHashSums_OutputsEmptyStringForFileThatCannotBeHashed

script_test.go:2167–2176  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2165}
2166
2167func TestHashSums_OutputsEmptyStringForFileThatCannotBeHashed(t *testing.T) {
2168 got, err := script.Echo("file_does_not_exist.txt").HashSums(sha256.New()).String()
2169 if err != nil {
2170 t.Fatal(err)
2171 }
2172 want := ""
2173 if got != want {
2174 t.Errorf("want %q, got %q", want, got)
2175 }
2176}
2177
2178func ExampleArgs() {
2179 script.Args().Stdout()

Callers

nothing calls this directly

Calls 3

EchoFunction · 0.92
StringMethod · 0.80
HashSumsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…