(t *testing.T)
| 2365 | } |
| 2366 | |
| 2367 | func Test_printHostHints(t *testing.T) { |
| 2368 | kiro := ®istry.AgentHost{ID: "kiro-cli", Name: "Kiro CLI", ProjectDir: ".kiro/skills", UserDir: ".kiro/skills"} |
| 2369 | copilot := ®istry.AgentHost{ID: "copilot-cli", Name: "GitHub Copilot CLI", ProjectDir: ".github/skills"} |
| 2370 | |
| 2371 | tests := []struct { |
| 2372 | name string |
| 2373 | hosts []*registry.AgentHost |
| 2374 | installed []string |
| 2375 | installDir string |
| 2376 | gitRoot string |
| 2377 | wantSub []string |
| 2378 | wantNot []string |
| 2379 | }{ |
| 2380 | { |
| 2381 | name: "no installs produces no output", |
| 2382 | hosts: []*registry.AgentHost{kiro}, |
| 2383 | installed: nil, |
| 2384 | installDir: "/repo/.kiro/skills", |
| 2385 | gitRoot: "/repo", |
| 2386 | wantNot: []string{"Kiro CLI"}, |
| 2387 | }, |
| 2388 | { |
| 2389 | name: "non-kiro host produces no output", |
| 2390 | hosts: []*registry.AgentHost{copilot}, |
| 2391 | installed: []string{"s1"}, |
| 2392 | installDir: "/repo/.github/skills", |
| 2393 | gitRoot: "/repo", |
| 2394 | wantNot: []string{"Kiro CLI"}, |
| 2395 | }, |
| 2396 | { |
| 2397 | name: "kiro project scope uses relative path", |
| 2398 | hosts: []*registry.AgentHost{kiro}, |
| 2399 | installed: []string{"s1"}, |
| 2400 | installDir: filepath.Join("/repo", ".kiro", "skills"), |
| 2401 | gitRoot: "/repo", |
| 2402 | wantSub: []string{"Kiro CLI", `"skill://.kiro/skills/**/SKILL.md"`}, |
| 2403 | }, |
| 2404 | { |
| 2405 | name: "kiro user scope uses absolute install dir", |
| 2406 | hosts: []*registry.AgentHost{kiro}, |
| 2407 | installed: []string{"s1"}, |
| 2408 | installDir: "/home/user/.kiro/skills", |
| 2409 | gitRoot: "/repo", |
| 2410 | wantSub: []string{`"skill:///home/user/.kiro/skills/**/SKILL.md"`}, |
| 2411 | wantNot: []string{`skill://.kiro/skills`}, |
| 2412 | }, |
| 2413 | { |
| 2414 | name: "kiro custom dir outside git root uses absolute path", |
| 2415 | hosts: []*registry.AgentHost{kiro}, |
| 2416 | installed: []string{"s1"}, |
| 2417 | installDir: "/tmp/my-skills", |
| 2418 | gitRoot: "/repo", |
| 2419 | wantSub: []string{`"skill:///tmp/my-skills/**/SKILL.md"`}, |
| 2420 | }, |
| 2421 | { |
| 2422 | name: "kiro without git root falls back to install dir", |
| 2423 | hosts: []*registry.AgentHost{kiro}, |
| 2424 | installed: []string{"s1"}, |
nothing calls this directly
no test coverage detected