(t *testing.T)
| 91 | } |
| 92 | |
| 93 | func TestResolveInput_RootCommit(t *testing.T) { |
| 94 | repo := initBareRepo(t) |
| 95 | writeCommit(t, repo, "a.txt", "one\n", "root") |
| 96 | head := gitOut(t, repo, "rev-parse", "HEAD") |
| 97 | |
| 98 | p := NewCommitProvider(repo, head, nil) |
| 99 | got := p.ResolveInput(context.Background()) |
| 100 | if got.ResolvedHead != head { |
| 101 | t.Errorf("ResolvedHead = %q, want %q", got.ResolvedHead, head) |
| 102 | } |
| 103 | if got.ResolvedBase != "" { |
| 104 | t.Errorf("ResolvedBase = %q, want empty for a root commit", got.ResolvedBase) |
| 105 | } |
| 106 | if got.ExactRange != "" { |
| 107 | t.Errorf("ExactRange = %q, want empty for a root commit", got.ExactRange) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | func TestResolveInput_MergeCommit(t *testing.T) { |
| 112 | repo := initBareRepo(t) |
nothing calls this directly
no test coverage detected