MCPcopy
hub / github.com/tdewolff/minify / TestMatch

Function TestMatch

minify_test.go:139–149  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

137}
138
139func TestMatch(t *testing.T) {
140 pattern, params, _ := m.Match("dummy/copy; a=b")
141 test.String(t, pattern, "dummy/copy")
142 test.String(t, params["a"], "b")
143
144 pattern, _, _ = m.Match("type/foobar")
145 test.String(t, pattern, "^type/.+$")
146
147 _, _, minifier := m.Match("dummy/")
148 test.That(t, minifier == nil)
149}
150
151func TestWildcard(t *testing.T) {
152 mimetypeTests := []struct {

Callers

nothing calls this directly

Calls 2

MatchMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…