Skip to content

Commit 2017f16

Browse files
committed
Adds a simple svn test script
1 parent 87b2d6b commit 2017f16

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

test-svn.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
4+
5+
svn --help > /dev/null || { echo "Fail: could not find 'svn' executable"; exit 1; }
6+
svnadmin --help > /dev/null || { echo "Fail: could not find 'svnadmin' executable"; exit 1; }
7+
8+
trap cleanup INT
9+
10+
function cleanup() {
11+
cd "$DIR/test-data"
12+
rm -rf proj proj-working svnrepo
13+
}
14+
15+
set -ex
16+
17+
cd test-data
18+
19+
mkdir -p proj/trunk
20+
21+
cp composer.from.json proj/trunk/composer.json
22+
cp composer.from.lock proj/trunk/composer.lock
23+
24+
svnadmin create svnrepo
25+
svn import ./proj file://$PWD/svnrepo -m "Initial commit"
26+
27+
svn checkout file://$PWD/svnrepo proj-working
28+
cp composer.to.json proj-working/trunk/composer.json
29+
cp composer.to.lock proj-working/trunk/composer.lock
30+
31+
cd proj-working/trunk
32+
../../../composer-lock-diff
33+
34+
cd ..
35+
../../composer-lock-diff -p trunk/
36+
37+
cd ..
38+
rm -rf proj proj-working svnrepo
39+

0 commit comments

Comments
 (0)