diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-05 23:52:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-05 23:52:48 +0300 |
commit | e0f9ec90278ec989ac7840a69f42a414f0db23f5 (patch) | |
tree | da196a1d49be6527919614e004f0090a9ffef590 /t/README | |
parent | fd952307ec2a260b1ed668d56f1a4cf3569baee3 (diff) | |
parent | a85efb598565718a06e560eb3f1ca038f6f3cd39 (diff) |
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/README')
-rw-r--r-- | t/README | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -982,6 +982,15 @@ library for your script to use. output to the downstream---unlike the real version, it generates only up to 99 lines. + - test_bool_env <env-variable-name> <default-value> + + Given the name of an environment variable with a bool value, + normalize its value to a 0 (true) or 1 (false or empty string) + return code. Return with code corresponding to the given default + value if the variable is unset. + Abort the test script if either the value of the variable or the + default are not valid bool values. + Prerequisites ------------- |