]> Tony Duckles's Git Repositories (git.nynim.org) - svn2svn.git/blob - tests/t0100-replay-all.sh
Improved unit-tests
[svn2svn.git] / tests / t0100-replay-all.sh
1 #!/bin/bash
2
3 test_description='Use svnreplay to create a full copy of the ref repo
4 '
5 . ./test-lib.sh
6
7 SVNREPLAY="../svnreplay.py"
8 PWD=$(pwd)
9 PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
10 REPO="$PWD/_repo_replay"
11 REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
12
13 # Clean-up
14 rm -rf "$REPO" _wc_target
15
16 # Init repo
17 svnadmin create "$REPO"
18 # Add pre-revprop-change hook script
19 cp ../hook-examples/pre-revprop-change_example.txt "$REPO/hooks/pre-revprop-change"
20 chmod 755 "$REPO/hooks/pre-revprop-change"
21
22
23 ################################################################
24 OFFSET="/"
25
26 test_expect_success \
27 "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET" \
28 "$SVNREPLAY -a \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
29
30 test_expect_success \
31 "diff-repo _repo_ref$OFFSET _repo_replay$OFFSET" \
32 "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
33
34 test_done