(t *testing.T)
| 598 | } |
| 599 | |
| 600 | func TestGetCommitRangeFiles_ModifiedFile(t *testing.T) { |
| 601 | tmpDir := t.TempDir() |
| 602 | setupGitRepo(t, tmpDir) |
| 603 | |
| 604 | // Create first commit |
| 605 | file := createFile(t, tmpDir, "test.txt", "initial content") |
| 606 | gitAdd(t, tmpDir, "test.txt") |
| 607 | firstCommit := gitCommitAndGetSHA(t, tmpDir, "First commit") |
| 608 | |
| 609 | // Modify and commit again |
| 610 | modifyFile(t, file) |
| 611 | gitAdd(t, tmpDir, "test.txt") |
| 612 | secondCommit := gitCommitAndGetSHA(t, tmpDir, "Second commit") |
| 613 | |
| 614 | files, err := GetCommitRangeFiles(tmpDir, firstCommit, secondCommit) |
| 615 | |
| 616 | require.NoError(t, err) |
| 617 | g := testhelpers.TextGoldie(t) |
| 618 | g.Assert(t, t.Name(), []byte(normalizeFilePaths(tmpDir, files))) |
| 619 | } |
| 620 | |
| 621 | func TestGetCommitRangeFiles_ExcludesDeletedFiles(t *testing.T) { |
| 622 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected