(t *testing.T)
| 90 | } |
| 91 | |
| 92 | func TestListWorktrees_PrimaryOnly(t *testing.T) { |
| 93 | repo := t.TempDir() |
| 94 | setupGitRepo(t, repo) |
| 95 | seedInitialCommit(t, repo) |
| 96 | |
| 97 | wts, err := ListWorktrees(repo) |
| 98 | require.NoError(t, err) |
| 99 | require.Len(t, wts, 1) |
| 100 | |
| 101 | assert.True(t, wts[0].IsPrimary) |
| 102 | assert.Equal(t, resolveSymlinks(repo), resolveSymlinks(wts[0].Path)) |
| 103 | assert.NotEmpty(t, wts[0].Head) |
| 104 | } |
| 105 | |
| 106 | func TestListWorktrees_PrimaryAndLinked(t *testing.T) { |
| 107 | repo := t.TempDir() |
nothing calls this directly
no test coverage detected