(t *testing.T)
| 54 | } |
| 55 | |
| 56 | func TestHandleGitStatus(t *testing.T) { |
| 57 | dir := newGitRepo(t) |
| 58 | e, out := newGitTestEngine() |
| 59 | if err := e.Execute(context.Background(), "git-status", []string{"--dir", dir}); err != nil { |
| 60 | t.Fatalf("git-status: %v", err) |
| 61 | } |
| 62 | s := out.String() |
| 63 | if !strings.Contains(s, "main") { |
| 64 | t.Errorf("status output missing branch:\n%s", s) |
| 65 | } |
| 66 | if !strings.Contains(s, "untracked.txt") { |
| 67 | t.Errorf("status output missing untracked file:\n%s", s) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | func TestHandleGitBranch(t *testing.T) { |
| 72 | dir := newGitRepo(t) |
nothing calls this directly
no test coverage detected