Follow upstream changes -- rest
[git-darcs-import.git] / tests / show-bug.sh
blob965291b0b15a4e327c6644aa9089702ceb8f7bd3
1 #!/usr/bin/env bash
2 set -ev
4 ## All these commands SHOULD fail (hence leading NOTs).
5 ## I would use the builtin !, but that has the wrong semantics.
6 not () { "$@" && exit 1 || :; }
8 rm -rf test
9 mkdir test
10 cd test
12 darcs show bug --debug 1> stdout 2> stderr || true
14 cat stdout
15 cat stderr
17 echo The following test will fail if this version of darcs is marked as
18 echo obsolete.
19 echo ==================================================================
21 not grep 'please do not' stderr
23 # The following test fails if HTTP isn't present, but would be a nice test
24 # to have in place.
26 #not grep unable stderr
28 grep 'fake bug' stderr
30 cd ..
31 rm -rf test