(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestFileNotExist(t *testing.T) { |
| 38 | t.TempDir() |
| 39 | hash, err := File(t.TempDir() + "/notafile") |
| 40 | if err != nil { |
| 41 | t.Errorf("got error: %v", err) |
| 42 | } |
| 43 | if hash != "" { |
| 44 | t.Errorf("got non-empty hash %q", hash) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestJSON(t *testing.T) { |
| 49 | a := struct{ A, B string }{"a", "b"} |