(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestPrintSearchURL(t *testing.T) { |
| 23 | var buffer bytes.Buffer |
| 24 | request.PrintSearchURL(&buffer, "/foo", "bar") |
| 25 | |
| 26 | output := buffer.String() |
| 27 | |
| 28 | if !regexp.MustCompile(`\s+/foo/packages\?query=bar\s+`).MatchString(output) { |
| 29 | t.Errorf("Unexpected output %s", output) |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func TestPrintShowURL(t *testing.T) { |
| 34 | var buffer bytes.Buffer |
nothing calls this directly
no test coverage detected