(t *testing.T)
| 396 | } |
| 397 | |
| 398 | func TestGetCommitDartFiles_HeadReference(t *testing.T) { |
| 399 | tmpDir := t.TempDir() |
| 400 | setupGitRepo(t, tmpDir) |
| 401 | |
| 402 | // Create first commit |
| 403 | createDartFile(t, tmpDir, "first.dart") |
| 404 | gitAdd(t, tmpDir, "first.dart") |
| 405 | gitCommit(t, tmpDir, "First commit") |
| 406 | |
| 407 | // Create second commit with HEAD test |
| 408 | createDartFile(t, tmpDir, "test.dart") |
| 409 | gitAdd(t, tmpDir, "test.dart") |
| 410 | gitCommit(t, tmpDir, "Add test.dart") |
| 411 | |
| 412 | // Get files from HEAD |
| 413 | files, err := GetCommitDartFiles(tmpDir, "HEAD") |
| 414 | |
| 415 | require.NoError(t, err) |
| 416 | g := testhelpers.TextGoldie(t) |
| 417 | g.Assert(t, t.Name(), []byte(normalizeFilePaths(tmpDir, files))) |
| 418 | } |
| 419 | |
| 420 | func TestGetCommitDartFiles_HeadTildeReference(t *testing.T) { |
| 421 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected