Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-10-21 13:42:10 +0300
committerJunio C Hamano <gitster@pobox.com>2016-10-21 19:54:34 +0300
commit925bdc928e3debdc6dbf28b5648711eb1c5583d3 (patch)
tree5e47eb34c6069985c08b7ecb036f80b4d50a4e7e /t
parent0b65a8dbdb38962e700ee16776a3042beb489060 (diff)
test-lib: handle TEST_OUTPUT_DIRECTORY with spaces
We are careful in test_done to handle a results directory with a space in it, but the "--tee" code path does not. Doing: export TEST_OUTPUT_DIRECTORY='/tmp/path with spaces' ./t000-init.sh --tee results in errors. Let's consistently double-quote our path variables so that this works. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-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 39c70f0326..01bb58ef00 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -58,8 +58,8 @@ done,*)
mkdir -p "$TEST_OUTPUT_DIRECTORY/test-results"
BASE="$TEST_OUTPUT_DIRECTORY/test-results/$(basename "$0" .sh)"
(GIT_TEST_TEE_STARTED=done ${SHELL_PATH} "$0" "$@" 2>&1;
- echo $? > $BASE.exit) | tee $BASE.out
- test "$(cat $BASE.exit)" = 0
+ echo $? >"$BASE.exit") | tee "$BASE.out"
+ test "$(cat "$BASE.exit")" = 0
exit
;;
esac