Merge branch 'darcs' into master
[git-darcs-import.git] / bugs / newlines.sh
blob8d741e926f58d4cf3523d779988ee58c23312373
1 #!/usr/bin/env bash
2 set -ev
4 rm -rf temp1 temp2
6 # set up the repository
7 mkdir temp1
8 cd temp1
9 darcs init
10 cd ..
12 cd temp1
13 echo -n "from temp1" > one.txt
14 darcs add one.txt
15 darcs record -A bar -am "add one.txt"
16 echo >> one.txt
17 cd ..
19 darcs get temp1 temp2
20 cd temp2
21 echo "in tmp2" >> one.txt
22 darcs record -A bar -am "add extra line"
23 lines_added=`darcs changes -v --last=1 | grep '\+' | wc -l`
24 echo $lines_added
25 test $lines_added -eq 1
26 cd ..
28 rm -rf temp1 temp2