]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t2402-worktree-list.sh
Merge branch 'pb/ref-filter-with-crlf'
[thirdparty/git.git] / t / t2402-worktree-list.sh
index 52585ec2aa8ba6d9104060361523c1b307bebfda..b85bd2655d8c6bc850062c8719585c4d954ed0a8 100755 (executable)
@@ -61,6 +61,16 @@ test_expect_success '"list" all worktrees --porcelain' '
        test_cmp expect actual
 '
 
+test_expect_success '"list" all worktress with locked annotation' '
+       test_when_finished "rm -rf locked unlocked out && git worktree prune" &&
+       git worktree add --detach locked master &&
+       git worktree add --detach unlocked master &&
+       git worktree lock locked &&
+       git worktree list >out &&
+       grep "/locked  *[0-9a-f].* locked$" out &&
+       ! grep "/unlocked  *[0-9a-f].* locked$" out
+'
+
 test_expect_success 'bare repo setup' '
        git init --bare bare1 &&
        echo "data" >file1 &&