aboutsummaryrefslogtreecommitdiffstats
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-07-13 14:54:52 -0700
committerJunio C Hamano <gitster@pobox.com>2022-07-13 14:54:52 -0700
commit92a25a8897b34db149df7e77ca625a9a151edb51 (patch)
treedb646c4ea60f57f40d976c5bf168b0083b75970a /t/test-lib.sh
parentdb791e6e8f8f10e4e785cd7b4ce292bd28e9dc61 (diff)
parenteb1cd60290d3898ef3c3293a11400f9fff9376cd (diff)
downloadgit-92a25a8897b34db149df7e77ca625a9a151edb51.tar.gz
Merge branch 'ab/test-quoting-fix'
Fixes for tests when the source directory has unusual characters in its path, e.g. whitespaces, double-quotes, etc. * ab/test-quoting-fix: config tests: fix harmless but broken "rm -r" cleanup test-lib.sh: fix prepend_var() quoting issue tests: add missing double quotes to included library paths
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 55857af601..8cabb4d10f 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -57,14 +57,14 @@ fi
#
# prepend_var VAR : VALUE
prepend_var () {
- eval "$1=$3\${$1:+${3:+$2}\$$1}"
+ eval "$1=\"$3\${$1:+${3:+$2}\$$1}\""
}
# If [AL]SAN is in effect we want to abort so that we notice
# problems. The GIT_SAN_OPTIONS variable can be used to set common
# defaults shared between [AL]SAN_OPTIONS.
prepend_var GIT_SAN_OPTIONS : abort_on_error=1
-prepend_var GIT_SAN_OPTIONS : strip_path_prefix=\"$GIT_BUILD_DIR/\"
+prepend_var GIT_SAN_OPTIONS : strip_path_prefix="$GIT_BUILD_DIR/"
# If we were built with ASAN, it may complain about leaks
# of program-lifetime variables. Disable it by default to lower