diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-02-20 13:27:51 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-02-20 13:27:51 +0000 |
commit | a1a5cbea74e706708678d00f88cf4cd1ea07f556 (patch) | |
tree | 3ea597ccbd6e992cf9f0d7206907bfaefec03d01 /tests/svn-single-commit.script | |
parent | 2c742c9edf459ca8b48393b579510c8943ba64f8 (diff) | |
download | lorry-a1a5cbea74e706708678d00f88cf4cd1ea07f556.tar.gz |
Add a single commit, single file, single master branch test for SVN.
Diffstat (limited to 'tests/svn-single-commit.script')
-rwxr-xr-x | tests/svn-single-commit.script | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/svn-single-commit.script b/tests/svn-single-commit.script new file mode 100755 index 0000000..f1c769c --- /dev/null +++ b/tests/svn-single-commit.script @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Tests converting a simple SVN repository to git. +# +# Copyright (C) 2012 Codethink Limited +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +set -e + +logfile="$DATADIR/svn-test-repo.log" +workdir="$DATADIR/work-dir" + +./lorry --pull-only --log="$logfile" --working-area="$workdir" \ + "$DATADIR/svn-test-repo.lorry" > /dev/null 2> /dev/null + +# verify that the git repository was created successfully +( + cd "$workdir/svn-test-repo/git/" + + # list the branches + git show-ref | cut -d' ' -f2 + + # cat the test file + git cat-file blob master:test.txt + + # list the commit messages + git log --pretty='%s' master +) |