(t *testing.T)
| 78 | } |
| 79 | |
| 80 | func 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 | |
| 94 | func TestRunner_RunSplit(t *testing.T) { |
| 95 | dir := initRepo(t) |