MCPcopy Create free account
hub / github.com/alibaba/open-code-review / TestRunner_Output

Function TestRunner_Output

internal/gitcmd/runner_test.go:80–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

78}
79
80func TestRunner_Output(t *testing.T) {
81 dir := initRepo(t)
82 r := New(2)
83
84 out, err := r.Output(context.Background(), dir, "rev-parse", "HEAD")
85 if err != nil {
86 t.Fatalf("Output error: %v", err)
87 }
88 hash := strings.TrimSpace(string(out))
89 if len(hash) != 40 {
90 t.Errorf("expected 40-char hash, got %q", hash)
91 }
92}
93
94func TestRunner_RunSplit(t *testing.T) {
95 dir := initRepo(t)

Callers

nothing calls this directly

Calls 3

initRepoFunction · 0.85
OutputMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected