This commit is contained in:
Lunny Xiao
2025-07-19 18:02:28 -07:00
parent be18643bfd
commit 68e5b28e7d
2 changed files with 25 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
package git
import (
"path/filepath"
"strings"
"testing"
@@ -196,7 +197,7 @@ func TestParseDiffHunkString(t *testing.T) {
}
func Test_GetAffectedHunksForTwoCommitsSpecialFile(t *testing.T) {
repoPath := "./tests/repos/repo4_commitsbetween"
repoPath := filepath.Join(testReposDir, "repo4_commitsbetween")
hunks, err := GetAffectedHunksForTwoCommitsSpecialFile(t.Context(), repoPath, "fdc1b615bdcff0f0658b216df0c9209e5ecb7c78", "a78e5638b66ccfe7e1b4689d3d5684e42c97d7ca", "test.txt")
assert.NoError(t, err)
assert.Len(t, hunks, 1)