(t *testing.T)
| 82 | } |
| 83 | |
| 84 | func TestLoadURLWithGzipResponse(t *testing.T) { |
| 85 | ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 86 | w.Header().Add("Content-Encoding", "gzip") |
| 87 | gz := gzip.NewWriter(w) |
| 88 | defer gz.Close() |
| 89 | fmt.Fprint(gz, htmlSample) |
| 90 | })) |
| 91 | defer ts.Close() |
| 92 | |
| 93 | _, err := LoadURL(ts.URL) |
| 94 | if err != nil { |
| 95 | t.Fatal(err) |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | func TestLoadDoc(t *testing.T) { |
| 100 | tempHTMLdoc, err := ioutil.TempFile("", "sample_*.html") |
nothing calls this directly
no test coverage detected
searching dependent graphs…