(t *testing.T)
| 251 | } |
| 252 | |
| 253 | func TestProjectInit_DirFlag(t *testing.T) { |
| 254 | tmpDir := t.TempDir() |
| 255 | subDir := filepath.Join(tmpDir, "my-project") |
| 256 | if err := os.Mkdir(subDir, 0755); err != nil { |
| 257 | t.Fatalf("failed to create subdirectory: %v", err) |
| 258 | } |
| 259 | |
| 260 | resetProjectInitFlags(subDir) |
| 261 | |
| 262 | err := runProjectInit(projectInitCmd, []string{}) |
| 263 | if err != nil { |
| 264 | t.Fatalf("unexpected error: %v", err) |
| 265 | } |
| 266 | |
| 267 | claudePath := filepath.Join(subDir, "CLAUDE.md") |
| 268 | if _, err := os.Stat(claudePath); os.IsNotExist(err) { |
| 269 | t.Error("CLAUDE.md should have been created in subdirectory") |
| 270 | } |
| 271 | |
| 272 | specPath := filepath.Join(subDir, specFilename) |
| 273 | if _, err := os.Stat(specPath); os.IsNotExist(err) { |
| 274 | t.Error("TASKMD_SPEC.md should have been created in subdirectory") |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | func TestProjectInit_StdoutPrintsWithoutCreatingFiles(t *testing.T) { |
| 279 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected