MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestMatchPath

Function TestMatchPath

skills/loader_test.go:228–247  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

226}
227
228func TestMatchPath(t *testing.T) {
229 tests := []struct {
230 pattern string
231 path string
232 want bool
233 }{
234 {"cmd/", "cmd/hooks.go", true},
235 {"*.go", "main.go", true},
236 {"scanner", "scanner/types.go", true},
237 {"nope", "cmd/hooks.go", false},
238 }
239
240 for _, tt := range tests {
241 t.Run(tt.pattern+"_"+tt.path, func(t *testing.T) {
242 if got := matchPath(tt.pattern, tt.path); got != tt.want {
243 t.Errorf("matchPath(%q, %q) = %v, want %v", tt.pattern, tt.path, got, tt.want)
244 }
245 })
246 }
247}
248
249func TestLoadSkills_Integration(t *testing.T) {
250 // Use a temp dir as root (no project/global skills, just builtins)

Callers

nothing calls this directly

Calls 1

matchPathFunction · 0.85

Tested by

no test coverage detected