mirror of
https://github.com/git/git.git
synced 2024-11-09 02:33:11 +01:00
f69e836fab
This fixes the remainder of the issues where the test script itself is at fault for failing when the git checkout path contains whitespace or other shell metacharacters. The majority of git svn tests used the idiom test_expect_success "title" "test script using $svnrepo" These were changed to have the test script in single-quotes: test_expect_success "title" 'test script using "$svnrepo"' which unfortunately makes the patch appear larger than it really is. One consequence of this change is that in the verbose test output the value of $svnrepo (and in some cases other variables, too) is no longer expanded, i.e. previously we saw * expecting success: test script using /path/to/git/t/trash/svnrepo but now it is: * expecting success: test script using "$svnrepo" Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
40 lines
1 KiB
Bash
Executable file
40 lines
1 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2007 Eric Wong
|
|
#
|
|
|
|
test_description='git-svn funky branch names'
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'setup svnrepo' '
|
|
mkdir project project/trunk project/branches project/tags &&
|
|
echo foo > project/trunk/foo &&
|
|
svn import -m "$test_description" project "$svnrepo/pr ject" &&
|
|
rm -rf project &&
|
|
svn cp -m "fun" "$svnrepo/pr ject/trunk" \
|
|
"$svnrepo/pr ject/branches/fun plugin" &&
|
|
svn cp -m "more fun!" "$svnrepo/pr ject/branches/fun plugin" \
|
|
"$svnrepo/pr ject/branches/more fun plugin!" &&
|
|
start_httpd
|
|
'
|
|
|
|
test_expect_success 'test clone with funky branch names' '
|
|
git svn clone -s "$svnrepo/pr ject" project &&
|
|
cd project &&
|
|
git rev-parse "refs/remotes/fun%20plugin" &&
|
|
git rev-parse "refs/remotes/more%20fun%20plugin!" &&
|
|
cd ..
|
|
'
|
|
|
|
test_expect_success 'test dcommit to funky branch' "
|
|
cd project &&
|
|
git reset --hard 'refs/remotes/more%20fun%20plugin!' &&
|
|
echo hello >> foo &&
|
|
git commit -m 'hello' -- foo &&
|
|
git svn dcommit &&
|
|
cd ..
|
|
"
|
|
|
|
stop_httpd
|
|
|
|
test_done
|