(t *testing.T)
| 318 | } |
| 319 | |
| 320 | func TestProjectInit_CodexFlag(t *testing.T) { |
| 321 | tmpDir := t.TempDir() |
| 322 | resetProjectInitFlags(tmpDir) |
| 323 | projectInitCodex = true |
| 324 | |
| 325 | err := runProjectInit(projectInitCmd, []string{}) |
| 326 | if err != nil { |
| 327 | t.Fatalf("unexpected error: %v", err) |
| 328 | } |
| 329 | |
| 330 | // Should create AGENTS.md and TASKMD_SPEC.md |
| 331 | agentsPath := filepath.Join(tmpDir, "AGENTS.md") |
| 332 | if _, err := os.Stat(agentsPath); os.IsNotExist(err) { |
| 333 | t.Error("AGENTS.md should have been created") |
| 334 | } |
| 335 | |
| 336 | specPath := filepath.Join(tmpDir, specFilename) |
| 337 | if _, err := os.Stat(specPath); os.IsNotExist(err) { |
| 338 | t.Error("TASKMD_SPEC.md should have been created") |
| 339 | } |
| 340 | |
| 341 | // Should NOT create CLAUDE.md |
| 342 | claudePath := filepath.Join(tmpDir, "CLAUDE.md") |
| 343 | if _, err := os.Stat(claudePath); err == nil { |
| 344 | t.Error("CLAUDE.md should not have been created when --codex is specified") |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | func TestProjectInit_AllAgentFlags(t *testing.T) { |
| 349 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected