(t *testing.T)
| 89 | } |
| 90 | |
| 91 | // withTempHome redirects $HOME to a tempdir for the duration of the test. |
| 92 | func withTempHome(t *testing.T) string { |
| 93 | t.Helper() |
| 94 | dir := t.TempDir() |
| 95 | oldHome := os.Getenv("HOME") |
| 96 | os.Setenv("HOME", dir) |
| 97 | t.Cleanup(func() { os.Setenv("HOME", oldHome) }) |
| 98 | return dir |
| 99 | } |
| 100 | |
| 101 | func TestSkillInstallWritesFile(t *testing.T) { |
| 102 | home := withTempHome(t) |
nothing calls this directly
no test coverage detected