(t *testing.T)
| 2341 | } |
| 2342 | |
| 2343 | func Test_printHostHints(t *testing.T) { |
| 2344 | kiro := ®istry.AgentHost{ID: "kiro-cli", Name: "Kiro CLI", ProjectDir: ".kiro/skills", UserDir: ".kiro/skills"} |
| 2345 | copilot := ®istry.AgentHost{ID: "copilot-cli", Name: "GitHub Copilot CLI", ProjectDir: ".github/skills"} |
| 2346 | |
| 2347 | tests := []struct { |
| 2348 | name string |
| 2349 | hosts []*registry.AgentHost |
| 2350 | installed []string |
| 2351 | installDir string |
| 2352 | gitRoot string |
| 2353 | wantSub []string |
| 2354 | wantNot []string |
| 2355 | }{ |
| 2356 | { |
| 2357 | name: "no installs produces no output", |
| 2358 | hosts: []*registry.AgentHost{kiro}, |
| 2359 | installed: nil, |
| 2360 | installDir: "/repo/.kiro/skills", |
| 2361 | gitRoot: "/repo", |
| 2362 | wantNot: []string{"Kiro CLI"}, |
| 2363 | }, |
| 2364 | { |
| 2365 | name: "non-kiro host produces no output", |
| 2366 | hosts: []*registry.AgentHost{copilot}, |
| 2367 | installed: []string{"s1"}, |
| 2368 | installDir: "/repo/.github/skills", |
| 2369 | gitRoot: "/repo", |
| 2370 | wantNot: []string{"Kiro CLI"}, |
| 2371 | }, |
| 2372 | { |
| 2373 | name: "kiro project scope uses relative path", |
| 2374 | hosts: []*registry.AgentHost{kiro}, |
| 2375 | installed: []string{"s1"}, |
| 2376 | installDir: filepath.Join("/repo", ".kiro", "skills"), |
| 2377 | gitRoot: "/repo", |
| 2378 | wantSub: []string{"Kiro CLI", `"skill://.kiro/skills/**/SKILL.md"`}, |
| 2379 | }, |
| 2380 | { |
| 2381 | name: "kiro user scope uses absolute install dir", |
| 2382 | hosts: []*registry.AgentHost{kiro}, |
| 2383 | installed: []string{"s1"}, |
| 2384 | installDir: "/home/user/.kiro/skills", |
| 2385 | gitRoot: "/repo", |
| 2386 | wantSub: []string{`"skill:///home/user/.kiro/skills/**/SKILL.md"`}, |
| 2387 | wantNot: []string{`skill://.kiro/skills`}, |
| 2388 | }, |
| 2389 | { |
| 2390 | name: "kiro custom dir outside git root uses absolute path", |
| 2391 | hosts: []*registry.AgentHost{kiro}, |
| 2392 | installed: []string{"s1"}, |
| 2393 | installDir: "/tmp/my-skills", |
| 2394 | gitRoot: "/repo", |
| 2395 | wantSub: []string{`"skill:///tmp/my-skills/**/SKILL.md"`}, |
| 2396 | }, |
| 2397 | { |
| 2398 | name: "kiro without git root falls back to install dir", |
| 2399 | hosts: []*registry.AgentHost{kiro}, |
| 2400 | installed: []string{"s1"}, |
nothing calls this directly
no test coverage detected