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>
This commit is contained in:
Johannes Schindelin 2018-01-03 17:54:50 +01:00 коммит произвёл Junio C Hamano
Родитель 42e6fde5c2
Коммит 567c53d00f
3 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -130,8 +130,8 @@ EOF
test_expect_success 'commit message from template with whitespace issue' '
echo "content galore" >>foo &&
git add foo &&
GIT_EDITOR="$TEST_DIRECTORY"/t7500/add-whitespaced-content git commit \
--template "$TEMPLATE" &&
GIT_EDITOR=\""$TEST_DIRECTORY"\"/t7500/add-whitespaced-content \
git commit --template "$TEMPLATE" &&
commit_msg_is "commit message"
'

Просмотреть файл

@ -25,8 +25,8 @@ init_git () {
git init &&
#git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump
# let's reuse an existing dump file!?
git remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump
git remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump
git remote add svnsim "testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump"
git remote add svnfile "testsvn::file://$TEST_DIRECTORY/t9154/svn.dump"
}
if test -e "$GIT_BUILD_DIR/git-remote-testsvn"

Просмотреть файл

@ -28,7 +28,7 @@ test_expect_success 'git-svn-HEAD is a real HEAD' '
git rev-parse --verify refs/heads/git-svn-HEAD^0
'
svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/')
svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/g')
test_expect_success 'initialize old-style (v0) git svn layout' '
mkdir -p "$GIT_DIR"/git-svn/info "$GIT_DIR"/svn/info &&