MCPcopy Create free account
hub / github.com/diillson/chatcli / TestHandleGitDiff_NameOnlyAndStat

Function TestHandleGitDiff_NameOnlyAndStat

pkg/coder/engine/commands_git_test.go:108–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

106}
107
108func 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
123func TestHandleGitChanged(t *testing.T) {
124 dir := newGitRepo(t)

Callers

nothing calls this directly

Calls 5

newGitRepoFunction · 0.85
newGitTestEngineFunction · 0.85
ErrorfMethod · 0.80
ExecuteMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected