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/README | |
parent | Merge branch 'mh/clear-topo-walk-upon-reset' (diff) | |
parent | t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool (diff) | |
download | tgif-e0f9ec90278ec989ac7840a69f42a414f0db23f5.tar.xz |
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 ------------- |