diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-25 13:59:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-25 13:59:20 -0700 |
commit | 023ff4cdf5793437313f481b4ef5b1ec247f2301 (patch) | |
tree | fe222b4b3edeb442b7873d89d03556a1e11c1274 /t/t1305-config-include.sh | |
parent | The sixth batch (diff) | |
parent | env--helper: mark a file-local symbol as static (diff) | |
download | tgif-023ff4cdf5793437313f481b4ef5b1ec247f2301.tar.xz |
Merge branch 'ab/test-env'
Many GIT_TEST_* environment variables control various aspects of
how our tests are run, but a few followed "non-empty is true, empty
or unset is false" while others followed the usual "there are a few
ways to spell true, like yes, on, etc., and also ways to spell
false, like no, off, etc." convention.
* ab/test-env:
env--helper: mark a file-local symbol as static
tests: make GIT_TEST_FAIL_PREREQS a boolean
tests: replace test_tristate with "git env--helper"
tests README: re-flow a previously changed paragraph
tests: make GIT_TEST_GETTEXT_POISON a boolean
t6040 test: stop using global "script" variable
config.c: refactor die_bad_number() to not call gettext() early
env--helper: new undocumented builtin wrapping git_env_*()
config tests: simplify include cycle test
Diffstat (limited to 't/t1305-config-include.sh')
-rwxr-xr-x | t/t1305-config-include.sh | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh index 9571e366f8..d20b4d150d 100755 --- a/t/t1305-config-include.sh +++ b/t/t1305-config-include.sh @@ -349,20 +349,13 @@ test_expect_success 'conditional include, onbranch, implicit /** for /' ' ' test_expect_success 'include cycles are detected' ' - cat >.gitconfig <<-\EOF && - [test]value = gitconfig - [include]path = cycle - EOF - cat >cycle <<-\EOF && - [test]value = cycle - [include]path = .gitconfig - EOF - cat >expect <<-\EOF && - gitconfig - cycle - EOF - test_must_fail git config --get-all test.value 2>stderr && - test_i18ngrep "exceeded maximum include depth" stderr + git init --bare cycle && + git -C cycle config include.path cycle && + git config -f cycle/cycle include.path config && + test_must_fail \ + env GIT_TEST_GETTEXT_POISON=false \ + git -C cycle config --get-all test.value 2>stderr && + grep "exceeded maximum include depth" stderr ' test_done |