mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
![Bryan Donlan](/assets/img/avatar_default.png)
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>
31 lines
789 B
Bash
Executable file
31 lines
789 B
Bash
Executable file
#!/bin/sh
|
|
test_description='git-svn rmdir'
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'initialize repo' '
|
|
mkdir import &&
|
|
cd import &&
|
|
mkdir -p deeply/nested/directory/number/1 &&
|
|
mkdir -p deeply/nested/directory/number/2 &&
|
|
echo foo > deeply/nested/directory/number/1/file &&
|
|
echo foo > deeply/nested/directory/number/2/another &&
|
|
svn import -m "import for git-svn" . "$svnrepo" &&
|
|
cd ..
|
|
'
|
|
|
|
test_expect_success 'mirror via git-svn' '
|
|
git-svn init "$svnrepo" &&
|
|
git-svn fetch &&
|
|
git checkout -f -b test-rmdir remotes/git-svn
|
|
'
|
|
|
|
test_expect_success 'Try a commit on rmdir' '
|
|
git rm -f deeply/nested/directory/number/2/another &&
|
|
git commit -a -m "remove another" &&
|
|
git-svn set-tree --rmdir HEAD &&
|
|
svn ls -R "$svnrepo" | grep ^deeply/nested/directory/number/1
|
|
'
|
|
|
|
|
|
test_done
|