Find git executable at run time
[git-darcs-import.git] / tests / send-dont-prompt-deps.sh
blob5a5addad0f8bd2b68c7fc0d179de42525fbe90c4
1 #!/usr/bin/env bash
3 set -ev
5 # Check that the right patches get sent using --dont-prompt-for-dependencies
7 rm -rf temp1
8 rm -rf temp2
9 mkdir temp2
10 mkdir temp1
11 cd temp2
12 darcs init
13 cd ..
14 cd temp1
15 darcs init
16 echo foo > f
17 darcs record -Ax -alm foo1
18 echo bar > b
19 darcs rec -Ax -alm bar1
20 echo foo2 > f
21 darcs record -Ax -alm foo2
22 echo bar2 > b
23 darcs record -Ax -alm bar2
24 echo y | darcs send ../temp2 --dont-prompt-for-dependencies -p foo2 --dry-run > toto
25 #on the previous line, we don't get asked about foo1.
26 grep foo toto | wc -l | grep 2
27 #but we send it anyway.
28 grep bar toto | wc -l | grep 0
29 cd ..
30 rm -rf temp1 temp2