Follow upstream changes -- rest
[git-darcs-import.git] / tests / mv_and_remove_tests.sh
blob8f9691ddd3833f92696817d1f65ad2c2209274fc
1 #!/usr/bin/env bash
2 set -ev
4 rm -rf temp
5 mkdir temp
6 cd temp
8 darcs init
9 touch fee fi fo fum
10 darcs add f*
11 darcs record --author me --all --no-test --patch-name add
12 mkdir d
13 darcs add d
14 darcs mv f* d
15 darcs remove d/fi
16 cd d
17 darcs remove fo
18 echo let us have fun > fun
19 darcs add fun
20 darcs mv fun fum ..
21 darcs record --author me --all --no-test --patch-name mv
22 cd ..
24 if darcs show files | egrep '^./fee$'; then false; else true; fi
25 test ! -f fee
26 darcs show contents d/fee | cmp d/fee -
28 test ! -f fi
29 test -f d/fi
30 if darcs show files | egrep '^./fi$'; then false; else true; fi
31 if darcs show files | egrep '^./d/fi$'; then false; else true; fi
33 test ! -f fo
34 test -f d/fo
35 if darcs show files | egrep '^./fo$'; then false; else true; fi
36 if darcs show files | egrep '^./d/fo$'; then false; else true; fi
38 darcs show contents fun | cmp fun -
39 darcs show contents fum | cmp fum -
41 darcs mv fun d
42 darcs record -A me -a --no-test -m "fun again"
43 darcs show content d/fun | cmp d/fun -
44 test ! -f fun
45 if darcs show files | egrep '^./fun$'; then false; else true; fi
47 # Now clean up.
48 cd ..
49 rm -rf temp