(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func 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 | |
| 97 | func TestRunner_RunSplit(t *testing.T) { |
| 98 | dir := initRepo(t) |