Phillip Wood [off-list ref] writes:
That all sounds sensible, the commit message could maybe flag that the
"feature-testbed" also sets OPENSSL_SHA1_UNSAFE which
"--feature-testbed" does not because it is only concerned with GIT_TEST_*.
quoted
diff --git a/t/test-lib.sh b/t/test-lib.sh
index de566309861..8863bcac930 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -202,6 +202,14 @@ finalize_test_case_output () { :; }
finalize_test_leak_output () { :; }
finalize_test_output () { :; }
+set_default_env () {
+ if eval "test -z \"\${$1+set}\""
This made me scratch my head for a couple of minutes, but I think it is
correct
set_default_env ABC 1
evaluates
test -z "${ABC+set}"
to see if $ABC is unset.
Thanks
Phillipquoted
+ then
+ eval "$1=\$2"
This one may want to quote the right hand side to be more widely
portable, i.e., eval "$1=\"\$2\"" or something along that line.
POSIX Bourne shell does not require the right hand side
VARIABLE=$VAR
to be quoted, but CodingGuidelines has observed some buggy shells.
It may be better to be extra clear than sorry.