Follow upstream changes -- rest
[git-darcs-import.git] / tests / rmdir-formerly-pl.sh
blob75e06c0abac542388e15d7294636e3cdfa86a0d4
1 #!/usr/bin/env bash
2 set -ev
4 not () { "$@" && exit 1 || :; }
6 rm -rf temp1
7 mkdir temp1
8 cd temp1
9 darcs init
10 mkdir foo
11 echo hello world > foo/bar
12 echo hello world > foo/baz
13 mkdir foo/dir
14 darcs add foo foo/bar foo/dir foo/baz
15 darcs record -a -m add
16 rm -rf foo
17 darcs show files --no-pending --no-dir > log
18 grep 'foo/baz' log
19 grep 'foo/bar' log
20 darcs show files --no-pending --no-fil > log
21 grep 'foo/dir' log
22 grep 'foo$' log
23 # now without...
24 darcs record -a -m del
25 darcs show files --no-pending --no-dir > log
26 not grep 'foo/baz' log
27 not grep 'foo/bar' log
28 darcs show files --no-pending --no-fil > log
29 not grep 'foo/dir' log
30 not grep 'foo$' log
31 cd ..
33 rm -rf temp1