aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t2402-worktree-list.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh
index a494df6d61..e0c6abd2f5 100755
--- a/t/t2402-worktree-list.sh
+++ b/t/t2402-worktree-list.sh
@@ -29,7 +29,8 @@ test_expect_success 'rev-parse --git-path objects linked worktree' '
test_cmp expect actual
'
-test_expect_success '"list" all worktrees from main' '
+test_expect_success '"list" all worktrees from main core.quotepath=false' '
+ test_config core.quotepath false &&
echo "$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]" >expect &&
test_when_finished "rm -rf áááá out actual expect && git worktree prune" &&
git worktree add --detach áááá main &&
@@ -38,7 +39,19 @@ test_expect_success '"list" all worktrees from main' '
test_cmp expect actual
'
+test_expect_success '"list" all worktrees from main core.quotepath=true' '
+ test_config core.quotepath true &&
+ echo "$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]" >expect &&
+ test_when_finished "rm -rf á out actual expect && git worktree prune" &&
+ git worktree add --detach á main &&
+ echo "\"$(git -C á rev-parse --show-toplevel)\" $(git rev-parse --short HEAD) (detached HEAD)" |
+ sed s/á/\\\\303\\\\241/g >>expect &&
+ git worktree list >actual &&
+ test_cmp expect actual
+'
+
test_expect_success '"list" all worktrees from linked' '
+ test_config core.quotepath false &&
echo "$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]" >expect &&
test_when_finished "rm -rf áááá out actual expect && git worktree prune" &&
git worktree add --detach áááá main &&