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

Function TestRunner_Output

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

Source from the content-addressed store, hash-verified

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