tests: don't lose exit status with "test <op> $(git ...)"
As with the preceding commit, rewrite tests that ran "git" inside command substitution and lost the exit status of "git" so that we notice the failing "git". This time around we're converting cases that didn't involve a containing sub-shell around the command substitution. In the case of "t0060-path-utils.sh" and "t2005-checkout-index-symlinks.sh" convert the relevant code to using the modern style of indentation and newline wrapping while having to change it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c7e03b4e39
commit
4bd0785dc2
@ -185,7 +185,9 @@ test_git_directory_exists () {
|
||||
if test -f sub1/.git
|
||||
then
|
||||
# does core.worktree point at the right place?
|
||||
test "$(git -C .git/modules/$1 config core.worktree)" = "../../../$1"
|
||||
echo "../../../$1" >expect &&
|
||||
git -C ".git/modules/$1" config core.worktree >actual &&
|
||||
test_cmp expect actual
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user