(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestGetCommitTreeFiles_SingleFile(t *testing.T) { |
| 15 | tmpDir := t.TempDir() |
| 16 | setupGitRepo(t, tmpDir) |
| 17 | |
| 18 | // Create and commit a file |
| 19 | createFile(t, tmpDir, "test.txt", "content") |
| 20 | gitAdd(t, tmpDir, "test.txt") |
| 21 | commitID := gitCommitAndGetSHA(t, tmpDir, "Initial commit") |
| 22 | |
| 23 | // Get all files in the commit tree |
| 24 | files, err := GetCommitTreeFiles(tmpDir, commitID) |
| 25 | |
| 26 | require.NoError(t, err) |
| 27 | g := testhelpers.TextGoldie(t) |
| 28 | g.Assert(t, t.Name(), []byte(normalizeFilePaths(tmpDir, files))) |
| 29 | } |
| 30 | |
| 31 | func TestGetCommitTreeFiles_MultipleFiles(t *testing.T) { |
| 32 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected