Follow upstream changes -- Bytestring updates
[git-darcs-import.git] / tests / addexitval.sh
blob606ffccce0afad4ee62d0a46c25fb0861d85ef4e
1 #!/usr/bin/env bash
3 set -ev
5 rm -rf tmp
6 mkdir tmp
7 cd tmp
8 darcs init
10 empty='test ! -s'
11 nonempty='test -s'
13 rm -f foo
14 darcs add foo >stdout 2>stderr && exit 1 || true
15 $empty stdout
16 $nonempty stderr
18 >foo
19 darcs add foo >stdout 2>stderr
20 $empty stdout
21 $empty stderr
23 darcs add foo >stdout 2>stderr && exit 1 || true
24 $empty stdout
25 $nonempty stderr
27 rm foo
28 darcs add foo >stdout 2>stderr && exit 1 || true
29 $empty stdout
30 $nonempty stderr
32 cd ..
33 rm -rf tmp