Code

notes merge: eliminate OUTPUT macro
[git.git] / t / t9010-svn-fe.sh
1 #!/bin/sh
3 test_description='check svn dumpfile importer'
5 . ./test-lib.sh
7 reinit_git () {
8         rm -fr .git &&
9         git init
10 }
12 >empty
14 test_expect_success 'empty dump' '
15         reinit_git &&
16         echo "SVN-fs-dump-format-version: 2" >input &&
17         test-svn-fe input >stream &&
18         git fast-import <stream
19 '
21 test_expect_success 'v3 dumps not supported' '
22         reinit_git &&
23         echo "SVN-fs-dump-format-version: 3" >input &&
24         test_must_fail test-svn-fe input >stream &&
25         test_cmp empty stream
26 '
28 test_expect_success 'set up svn repo' '
29         svnconf=$PWD/svnconf &&
30         mkdir -p "$svnconf" &&
32         if
33                 svnadmin -h >/dev/null 2>&1 &&
34                 svnadmin create simple-svn &&
35                 svnadmin load simple-svn <"$TEST_DIRECTORY/t9135/svn.dump" &&
36                 svn export --config-dir "$svnconf" "file://$PWD/simple-svn" simple-svnco
37         then
38                 test_set_prereq SVNREPO
39         fi
40 '
42 test_expect_success SVNREPO 't9135/svn.dump' '
43         git init simple-git &&
44         test-svn-fe "$TEST_DIRECTORY/t9135/svn.dump" >simple.fe &&
45         (
46                 cd simple-git &&
47                 git fast-import <../simple.fe
48         ) &&
49         (
50                 cd simple-svnco &&
51                 git init &&
52                 git add . &&
53                 git fetch ../simple-git master &&
54                 git diff --exit-code FETCH_HEAD
55         )
56 '
58 test_done