(t *testing.T)
| 106 | } |
| 107 | |
| 108 | func TestHandleGitDiff_NameOnlyAndStat(t *testing.T) { |
| 109 | dir := newGitRepo(t) |
| 110 | if err := os.WriteFile(filepath.Join(dir, "tracked.txt"), []byte("hello\nchanged\n"), 0600); err != nil { |
| 111 | t.Fatal(err) |
| 112 | } |
| 113 | e, out := newGitTestEngine() |
| 114 | if err := e.Execute(context.Background(), "git-diff", |
| 115 | []string{"--dir", dir, "--name-only", "--stat", "--path", "tracked.txt"}); err != nil { |
| 116 | t.Fatalf("git-diff: %v", err) |
| 117 | } |
| 118 | if !strings.Contains(out.String(), "tracked.txt") { |
| 119 | t.Errorf("name-only diff output = %q", out.String()) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func TestHandleGitChanged(t *testing.T) { |
| 124 | dir := newGitRepo(t) |
nothing calls this directly
no test coverage detected