diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 272a071e85..768054dd4e 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -213,8 +213,8 @@ test_expect_success '__gitdir - non-existing $GIT_DIR' ' ' test_expect_success '__gitdir - gitfile in cwd' ' - echo "$(pwd -P)/otherrepo/.git" >expected && - echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" >subdir/.git && + echo "$(pwd -W)/otherrepo/.git" >expected && + echo "gitdir: $(pwd -W)/otherrepo/.git" >subdir/.git && test_when_finished "rm -f subdir/.git" && ( cd subdir && @@ -224,8 +224,8 @@ test_expect_success '__gitdir - gitfile in cwd' ' ' test_expect_success '__gitdir - gitfile in parent' ' - echo "$(pwd -P)/otherrepo/.git" >expected && - echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" >subdir/.git && + echo "$(pwd -W)/otherrepo/.git" >expected && + echo "gitdir: $(pwd -W)/otherrepo/.git" >subdir/.git && test_when_finished "rm -f subdir/.git" && ( cd subdir/subsubdir &&