Skip to content

Commit dfe4216

Browse files
committed
Merge branch 'jc/t0017-clarify-bogus-expectation'
Test clean-up. * jc/t0017-clarify-bogus-expectation: t0017: clarify dubious test set-up
2 parents 789ec1d + 22f13e0 commit dfe4216

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

t/t0017-env-helper.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,16 @@ test_expect_success 'test-tool env-helper reads config thanks to trace2' '
9191
git config -l 2>err &&
9292
grep "exceeded maximum include depth" err &&
9393
94+
# This validates that the assumption that we attempt to
95+
# read the configuration and fail very early in the start-up
96+
# sequence (due to trace2 subsystem), even before we notice
97+
# that the directory named with "test-tool -C" does not exist
98+
# and die. It is a dubious thing to test, though.
9499
test_must_fail \
95100
env HOME="$(pwd)/home" GIT_TEST_ENV_HELPER=true \
96-
test-tool -C cycle env-helper --type=bool --default=0 --exit-code GIT_TEST_ENV_HELPER 2>err &&
101+
test-tool -C no-such-directory \
102+
env-helper --type=bool --default=0 \
103+
--exit-code GIT_TEST_ENV_HELPER 2>err &&
97104
grep "exceeded maximum include depth" err
98105
'
99106

0 commit comments

Comments
 (0)