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

Function TestRunner_Run

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

Source from the content-addressed store, hash-verified

58}
59
60func TestRunner_Run(t *testing.T) {
61 dir := initRepo(t)
62 r := New(2)
63
64 out, err := r.Run(context.Background(), dir, "log", "--oneline")
65 if err != nil {
66 t.Fatalf("Run error: %v", err)
67 }
68 if !strings.Contains(out, "init") {
69 t.Errorf("expected 'init' in output: %q", out)
70 }
71}
72
73func TestRunner_Run_InvalidCommand(t *testing.T) {
74 dir := initRepo(t)

Callers

nothing calls this directly

Calls 3

initRepoFunction · 0.85
NewFunction · 0.70
RunMethod · 0.45

Tested by

no test coverage detected