--all with --force overwrites existing.
(t *testing.T)
| 245 | |
| 246 | // --all with --force overwrites existing. |
| 247 | func TestSkillInstallAllForce(t *testing.T) { |
| 248 | home := isolatedHome(t) |
| 249 | seedEntity(t, entities.KindSkill, "s1", "new-body", "") |
| 250 | installEntityToApp(t, home, entities.KindSkill, "s1", "old-body", "claude") |
| 251 | stdout, _, code := execute(t, "skill", "install", "--all", "--app", "claude", "--force") |
| 252 | if code != 0 { |
| 253 | t.Fatalf("exit = %d", code) |
| 254 | } |
| 255 | if !strings.Contains(stdout, "Installed 1 skill(s)") { |
| 256 | t.Fatalf("missing install count:\n%s", stdout) |
| 257 | } |
| 258 | data, _ := os.ReadFile(filepath.Join(home, ".claude", "skills", "s1", "SKILL.md")) |
| 259 | if string(data) != "new-body" { |
| 260 | t.Fatalf("expected new-body, got %q", data) |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | // Already installed without --force skips. |
| 265 | func TestSkillInstallSkipsExisting(t *testing.T) { |
nothing calls this directly
no test coverage detected