Follow upstream changes -- Bytestring updates
[git-darcs-import.git] / tests / output.sh
blob56874bc47e39e953f85f3d7a78cefb0ec2780c24
1 #!/usr/bin/env bash
2 set -ev
4 rm -rf temp1 temp2 temp3
5 mkdir temp2
6 cd temp2
7 darcs init
8 cd ..
10 mkdir temp1
11 cd temp1
12 darcs init
13 touch foo bar
14 darcs add foo bar
15 darcs record -a -m foobar -A author
16 darcs send -a --dont-edit-description -o ../temp3 ../temp2
17 test -f ../temp3
19 darcs send -a --dont-edit-description -o ../temp2/patchfile ../temp2
20 test -f ../temp2/patchfile
22 mkdir subdir
23 darcs send -a --dont-edit-description -o subdir/../../temp2/patchfile1 ../temp2
24 test -f ../temp2/patchfile1
26 cp ../temp3 correct
28 cd subdir
29 darcs send -a --dont-edit-description -o ../patchfile ../../temp2
30 diff -u ../patchfile ../correct
32 rm ../patchfile
33 darcs send -a --dont-edit-description -o - ../../temp2 > ../patchfile
34 grep -v Creating ../patchfile | diff -u ../correct -
36 darcs apply --repodir=../../temp2 --dry-run ../patchfile > out
37 cat out
38 grep foobar out
40 cd ../..
42 cd temp2
44 darcs apply --dry-run ../temp3 > out
45 cat out
46 grep foobar out
48 darcs apply --dry-run ../temp1/correct > out
49 cat out
50 grep foobar out
52 darcs apply --dry-run ../temp1/patchfile > out
53 cat out
54 grep foobar out
56 darcs apply --dry-run ../temp3 > out
57 cat out
58 grep foobar out
60 darcs apply --dry-run ../temp3 > out
61 cat out
62 grep foobar out
64 cd ..
66 rm -rf temp1 temp2 temp3