Merge branch 'ab/svn-tests-set-e-fix'

Test clean-up.

* ab/svn-tests-set-e-fix:
  svn tests: refactor away a "set -e" in test body
  svn tests: remove legacy re-setup from init-clone test
This commit is contained in:
Junio C Hamano
2021-05-07 12:47:40 +09:00
2 changed files with 15 additions and 18 deletions

View File

@@ -7,12 +7,6 @@ test_description='git svn init/clone tests'
. ./lib-git-svn.sh . ./lib-git-svn.sh
# setup, run inside tmp so we don't have any conflicts with $svnrepo
set -e
rm -r .git
mkdir tmp
cd tmp
test_expect_success 'setup svnrepo' ' test_expect_success 'setup svnrepo' '
mkdir project project/trunk project/branches project/tags && mkdir project project/trunk project/branches project/tags &&
echo foo > project/trunk/foo && echo foo > project/trunk/foo &&

View File

@@ -7,19 +7,22 @@ test_description='git svn propset tests'
. ./lib-git-svn.sh . ./lib-git-svn.sh
foo_subdir2="subdir/subdir2/foo_subdir2" test_expect_success 'setup propset via import' '
test_when_finished "rm -rf import" &&
set -e foo_subdir2="subdir/subdir2/foo_subdir2" &&
mkdir import && mkdir -p import/subdir/subdir2 &&
(set -e ; cd import (
mkdir subdir cd import &&
mkdir subdir/subdir2 # for "add props top level"
touch foo # for 'add props top level' >foo &&
touch subdir/foo_subdir # for 'add props relative' # for "add props relative"
touch "$foo_subdir2" # for 'add props subdir' >subdir/foo_subdir &&
svn_cmd import -m 'import for git svn' . "$svnrepo" >/dev/null # for "add props subdir"
) >"$foo_subdir2" &&
rm -rf import svn_cmd import -m "import for git svn" . "$svnrepo"
)
'
test_expect_success 'initialize git svn' ' test_expect_success 'initialize git svn' '
git svn init "$svnrepo" git svn init "$svnrepo"