(t *testing.T)
| 123 | if rc := cmdSkill([]string{"install"}); rc != 0 { |
| 124 | t.Fatalf("first install rc=%d", rc) |
| 125 | } |
| 126 | if rc := cmdSkill([]string{"install"}); rc == 0 { |
| 127 | t.Errorf("second install without --force should fail, got rc=%d", rc) |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | func TestSkillInstallForceOverwrites(t *testing.T) { |
| 132 | home := withTempHome(t) |
| 133 | path := filepath.Join(home, ".claude", "skills", "flow", "SKILL.md") |
| 134 | |
| 135 | // Pre-create something different. |
| 136 | if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { |
| 137 | t.Fatal(err) |
nothing calls this directly
no test coverage detected