diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-05 12:52:48 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-05 12:52:48 -0800 |
commit | e0f9ec90278ec989ac7840a69f42a414f0db23f5 (patch) | |
tree | da196a1d49be6527919614e004f0090a9ffef590 /t/test-lib.sh | |
parent | fd952307ec2a260b1ed668d56f1a4cf3569baee3 (diff) | |
parent | a85efb598565718a06e560eb3f1ca038f6f3cd39 (diff) | |
download | git-e0f9ec90278ec989ac7840a69f42a414f0db23f5.tar.gz |
Merge branch 'sg/test-bool-env'
Recently we have declared that GIT_TEST_* variables take the
usual boolean values (it used to be that some used "non-empty
means true" and taking GIT_TEST_VAR=YesPlease as true); make
sure we notice and fail when non-bool strings are given to
these variables.
* sg/test-bool-env:
t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool
tests: add 'test_bool_env' to catch non-bool GIT_TEST_* values
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index e8ae150d75..5fbf4d25ed 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1406,19 +1406,19 @@ yes () { # The GIT_TEST_FAIL_PREREQS code hooks into test_set_prereq(), and # thus needs to be set up really early, and set an internal variable # for convenience so the hot test_set_prereq() codepath doesn't need -# to call "git env--helper". Only do that work if needed by seeing if -# GIT_TEST_FAIL_PREREQS is set at all. +# to call "git env--helper" (via test_bool_env). Only do that work +# if needed by seeing if GIT_TEST_FAIL_PREREQS is set at all. GIT_TEST_FAIL_PREREQS_INTERNAL= if test -n "$GIT_TEST_FAIL_PREREQS" then - if git env--helper --type=bool --default=0 --exit-code GIT_TEST_FAIL_PREREQS + if test_bool_env GIT_TEST_FAIL_PREREQS false then GIT_TEST_FAIL_PREREQS_INTERNAL=true test_set_prereq FAIL_PREREQS fi else test_lazy_prereq FAIL_PREREQS ' - git env--helper --type=bool --default=0 --exit-code GIT_TEST_FAIL_PREREQS + test_bool_env GIT_TEST_FAIL_PREREQS false ' fi @@ -1477,7 +1477,7 @@ then fi test_lazy_prereq C_LOCALE_OUTPUT ' - ! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON + ! test_bool_env GIT_TEST_GETTEXT_POISON false ' if test -z "$GIT_TEST_CHECK_CACHE_TREE" |