summaryrefslogtreecommitdiff
path: root/t/t0017-env-helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t0017-env-helper.sh')
-rwxr-xr-xt/t0017-env-helper.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t0017-env-helper.sh b/t/t0017-env-helper.sh
index 709bbbd..c1ecf6a 100755
--- a/t/t0017-env-helper.sh
+++ b/t/t0017-env-helper.sh
@@ -80,4 +80,20 @@ test_expect_success 'env--helper --type=ulong' '
test_must_be_empty actual.err
'
+test_expect_success 'env--helper reads config thanks to trace2' '
+ mkdir home &&
+ git config -f home/.gitconfig include.path cycle &&
+ git config -f home/cycle include.path .gitconfig &&
+
+ test_must_fail \
+ env HOME="$(pwd)/home" GIT_TEST_GETTEXT_POISON=false \
+ git config -l 2>err &&
+ grep "exceeded maximum include depth" err &&
+
+ test_must_fail \
+ env HOME="$(pwd)/home" GIT_TEST_GETTEXT_POISON=true \
+ git -C cycle env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON 2>err &&
+ grep "# GETTEXT POISON #" err
+'
+
test_done