]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9117-git-svn-init-clone.sh
Merge branch 'ae/better-template-failure-report'
[thirdparty/git.git] / t / t9117-git-svn-init-clone.sh
CommitLineData
41337e22
EW
1#!/bin/sh
2#
3# Copyright (c) 2007 Eric Wong
4#
5
1364ff27 6test_description='git svn init/clone tests'
41337e22
EW
7
8. ./lib-git-svn.sh
9
10# setup, run inside tmp so we don't have any conflicts with $svnrepo
11set -e
12rm -r .git
13mkdir tmp
14cd tmp
15
f69e836f 16test_expect_success 'setup svnrepo' '
41337e22
EW
17 mkdir project project/trunk project/branches project/tags &&
18 echo foo > project/trunk/foo &&
da083d68 19 svn_cmd import -m "$test_description" project "$svnrepo"/project &&
41337e22 20 rm -rf project
f69e836f 21 '
41337e22 22
f69e836f 23test_expect_success 'basic clone' '
41337e22 24 test ! -d trunk &&
f69e836f 25 git svn clone "$svnrepo"/project/trunk &&
41337e22
EW
26 test -d trunk/.git/svn &&
27 test -e trunk/foo &&
28 rm -rf trunk
f69e836f 29 '
41337e22 30
f69e836f 31test_expect_success 'clone to target directory' '
41337e22 32 test ! -d target &&
f69e836f 33 git svn clone "$svnrepo"/project/trunk target &&
41337e22
EW
34 test -d target/.git/svn &&
35 test -e target/foo &&
36 rm -rf target
f69e836f 37 '
41337e22 38
f69e836f 39test_expect_success 'clone with --stdlayout' '
41337e22 40 test ! -d project &&
f69e836f 41 git svn clone -s "$svnrepo"/project &&
41337e22
EW
42 test -d project/.git/svn &&
43 test -e project/foo &&
44 rm -rf project
f69e836f 45 '
41337e22 46
f69e836f 47test_expect_success 'clone to target directory with --stdlayout' '
41337e22 48 test ! -d target &&
f69e836f 49 git svn clone -s "$svnrepo"/project target &&
41337e22
EW
50 test -d target/.git/svn &&
51 test -e target/foo &&
52 rm -rf target
f69e836f 53 '
41337e22
EW
54
55test_done