MCPcopy Create free account
hub / github.com/archlinux-de/pkgstats-cli / TestPrintShowURL

Function TestPrintShowURL

internal/api/request/printer_test.go:33–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestPrintShowURL(t *testing.T) {
34 var buffer bytes.Buffer
35 request.PrintShowURL(&buffer, "/foo", []string{"bar", "baz"})
36
37 output := buffer.String()
38
39 if !regexp.MustCompile(`\s+/foo/compare/packages/bar,baz\s+`).MatchString(output) {
40 t.Errorf("Unexpected output %s", output)
41 }
42}

Callers

nothing calls this directly

Calls 1

PrintShowURLFunction · 0.92

Tested by

no test coverage detected