Follow upstream changes -- Bytestring updates
[git-darcs-import.git] / tests / binary.sh
blob9e435c658c0a36675ee499aefb3db08fbe95ecba
1 #!/usr/bin/env bash
2 set -ve
3 binary=example_binary.png
4 function checkbinary(){
5 cmp $binary ../temp1/$binary
7 rm -rf temp1 temp2
8 mkdir temp1 temp2
9 cd temp1
10 darcs init
11 cp ../$binary .
12 darcs add $binary
13 darcs record -am P1
14 cd ../temp2
15 darcs init
16 test ! -e $binary
17 darcs pull ../temp1 -a
18 checkbinary
19 darcs obliterate -a
20 test ! -e $binary
21 darcs pull ../temp1 -a
22 checkbinary
23 darcs unrecord -a
24 checkbinary
25 darcs revert -a
26 test ! -e $binary
27 darcs unrevert -a
28 checkbinary
29 rm -rf temp1 temp2