Allow the test suite to pass in a directory whose name contains spaces
It is totally legitimate to clone Git's source code anywhere, including into, say, directories whose name (or the name of its absolute path) contains spaces. However, a couple of tests failed to anticipate this, for lack of quoting (or in one instance, for failure to expect more than one space in the absolute path of the TEST_DIRECTORY). This can be easily verified by calling these commands in your current clone: git clone . with\ spaces cd with\ spaces make -j15 test Let's fix this. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jan 3, 2018 at 17:54 UTC
567c53d00f194a2826dda0b6be5d66283138377d
3 files changed
+5
-5
t/t7500-commit.sh
+2
-2
@@ -130,8 +130,8 @@ EOF
130
test_expect_success 'commit message from template with whitespace issue' '
131
echo "content galore" >>foo &&
132
git add foo &&
133
- GIT_EDITOR="$TEST_DIRECTORY"/t7500/add-whitespaced-content git commit \
134
- --template "$TEMPLATE" &&
133
+ GIT_EDITOR=\""$TEST_DIRECTORY"\"/t7500/add-whitespaced-content \
134
+ git commit --template "$TEMPLATE" &&
135
commit_msg_is "commit message"
136
'
137
t/t9020-remote-svn.sh
+2
-2
@@ -25,8 +25,8 @@ init_git () {
25
git init &&
26
#git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump
27
# let's reuse an existing dump file!?
28
- git remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump
29
- git remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump
28
+ git remote add svnsim "testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump"
29
+ git remote add svnfile "testsvn::file://$TEST_DIRECTORY/t9154/svn.dump"
30
}
31
32
if test -e "$GIT_BUILD_DIR/git-remote-testsvn"
t/t9107-git-svn-migrate.sh
+1
-1
@@ -28,7 +28,7 @@ test_expect_success 'git-svn-HEAD is a real HEAD' '
28
git rev-parse --verify refs/heads/git-svn-HEAD^0
29
'
30
31
-svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/')
31
+svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/g')
32
33
test_expect_success 'initialize old-style (v0) git svn layout' '
34
mkdir -p "$GIT_DIR"/git-svn/info "$GIT_DIR"/svn/info &&