diff options
Diffstat (limited to 'git-codereview/branch_test.go')
| -rw-r--r-- | git-codereview/branch_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git-codereview/branch_test.go b/git-codereview/branch_test.go index d7db6ee..2ac3c03 100644 --- a/git-codereview/branch_test.go +++ b/git-codereview/branch_test.go @@ -5,6 +5,7 @@ package main import ( + "path/filepath" "reflect" "strings" "testing" @@ -83,6 +84,11 @@ func TestLocalBranches(t *testing.T) { t.Logf("detached head mode") trun(t, gt.client, "git", "checkout", "HEAD^0") checkLocalBranches(t, "HEAD", "main", "newbranch") + + t.Logf("worktree") + wt := filepath.Join(gt.tmpdir, "git-worktree") + trun(t, gt.client, "git", "worktree", "add", "-b", "wtbranch", wt) + checkLocalBranches(t, "HEAD", "main", "newbranch", "wtbranch") } func checkLocalBranches(t *testing.T, want ...string) { |
