(t *testing.T)
| 645 | } |
| 646 | |
| 647 | func TestGetCommitRangeFiles_NoChanges(t *testing.T) { |
| 648 | tmpDir := t.TempDir() |
| 649 | setupGitRepo(t, tmpDir) |
| 650 | |
| 651 | createFile(t, tmpDir, "test.txt", "content") |
| 652 | gitAdd(t, tmpDir, "test.txt") |
| 653 | commit := gitCommitAndGetSHA(t, tmpDir, "Commit") |
| 654 | |
| 655 | // Same commit for from and to |
| 656 | files, err := GetCommitRangeFiles(tmpDir, commit, commit) |
| 657 | |
| 658 | require.NoError(t, err) |
| 659 | g := testhelpers.TextGoldie(t) |
| 660 | g.Assert(t, t.Name(), []byte(normalizeFilePaths(tmpDir, files))) |
| 661 | } |
| 662 | |
| 663 | func TestGetCommitRangeFiles_InvalidFromCommit(t *testing.T) { |
| 664 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected