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

Function TestRunner_Run

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

Source from the content-addressed store, hash-verified

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