(t *testing.T)
| 644 | } |
| 645 | |
| 646 | func TestFromSubdir(t *testing.T) { |
| 647 | t.Parallel() |
| 648 | |
| 649 | repo := testutils.NewTestRepo(t, false, "subdir") |
| 650 | defer repo.Remove(t) |
| 651 | |
| 652 | timestamp := time.Unix(1112911993, 0) |
| 653 | |
| 654 | repo.AddFile(t, "subdir/file.txt", "Hello, world!\n") |
| 655 | |
| 656 | cmd := repo.GitCommand(t, "commit", "-m", "initial") |
| 657 | testutils.AddAuthorInfo(cmd, ×tamp) |
| 658 | require.NoError(t, cmd.Run(), "creating commit") |
| 659 | |
| 660 | h, err := sizes.ScanRepositoryUsingGraph( |
| 661 | repo.Repository(t), |
| 662 | refGrouper{}, sizes.NameStyleNone, meter.NoProgressMeter, |
| 663 | ) |
| 664 | require.NoError(t, err, "scanning repository") |
| 665 | assert.Equal(t, counts.Count32(2), h.MaxPathDepth, "max path depth") |
| 666 | } |
| 667 | |
| 668 | func TestSubmodule(t *testing.T) { |
| 669 | t.Parallel() |
nothing calls this directly
no test coverage detected