(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestProjectInit_GeminiFlag(t *testing.T) { |
| 66 | tmpDir := t.TempDir() |
| 67 | resetProjectInitFlags(tmpDir) |
| 68 | projectInitGemini = true |
| 69 | |
| 70 | err := runProjectInit(projectInitCmd, []string{}) |
| 71 | if err != nil { |
| 72 | t.Fatalf("unexpected error: %v", err) |
| 73 | } |
| 74 | |
| 75 | // Should create GEMINI.md |
| 76 | geminiPath := filepath.Join(tmpDir, "GEMINI.md") |
| 77 | content, err := os.ReadFile(geminiPath) |
| 78 | if err != nil { |
| 79 | t.Fatalf("failed to read GEMINI.md: %v", err) |
| 80 | } |
| 81 | if !bytes.Equal(content, geminiTemplate) { |
| 82 | t.Error("GEMINI.md content does not match template") |
| 83 | } |
| 84 | |
| 85 | // Should create TASKMD_SPEC.md |
| 86 | specPath := filepath.Join(tmpDir, specFilename) |
| 87 | if _, err := os.Stat(specPath); os.IsNotExist(err) { |
| 88 | t.Error("TASKMD_SPEC.md should have been created") |
| 89 | } |
| 90 | |
| 91 | // Should NOT create CLAUDE.md |
| 92 | claudePath := filepath.Join(tmpDir, "CLAUDE.md") |
| 93 | if _, err := os.Stat(claudePath); err == nil { |
| 94 | t.Error("CLAUDE.md should not have been created when --gemini is specified") |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | func TestProjectInit_MultipleAgentFlags(t *testing.T) { |
| 99 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected