summaryrefslogtreecommitdiff
path: root/t/README
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-12-05 12:52:48 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-12-05 12:52:48 -0800
commite0f9ec90278ec989ac7840a69f42a414f0db23f5 (patch)
treeda196a1d49be6527919614e004f0090a9ffef590 /t/README
parentMerge branch 'mh/clear-topo-walk-upon-reset' (diff)
parentt5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool (diff)
downloadtgif-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/README9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/README b/t/README
index 5132ec83f8..caa125ba9a 100644
--- a/t/README
+++ b/t/README
@@ -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
-------------