Follow upstream changes -- rest
[git-darcs-import.git] / tests / whatsnew-file.sh
blobcde79a649d1cb2ca9e783892a8f84254771dce1d
1 #!/usr/bin/env bash
2 set -ev
4 not () { "$@" && exit 1 || :; }
6 # Some tests for 'darcs whatsnew '
8 rm -rf temp1
10 mkdir temp1
11 cd temp1
13 darcs init
14 date > foo
15 mkdir bar
16 echo hello world > bar/baz
18 darcs record -la -m "add foo"
20 echo goodbye world >> bar/baz
22 # goodbye should show up precisely once
24 darcs wh > out
25 cat out
26 grep goodbye out | wc -l | grep 1
28 darcs wh bar bar/baz > out
29 cat out
30 grep goodbye out | wc -l | grep 1
32 darcs mv foo bar
33 echo not date > bar/foo
35 darcs wh bar bar/baz > out
36 cat out
37 grep date out | wc -l | grep 1
39 darcs wh foo > out
40 cat out
41 grep date out | wc -l | grep 1
43 darcs wh foo foo foo > out
44 cat out
45 grep date out | wc -l | grep 1
47 cd ..
49 rm -rf temp1