summaryrefslogtreecommitdiff
path: root/tests/tests/gitconfig
blob: 12b342b51cb10c4917b51588e6bd3499260ef965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
. tests/lib

t-tstunt-parsechangelog

t-prep-newpackage example 1.0

cd $p

t-dgit clean | tee ../t.output
grep 'EXAMPLE RULES TARGET clean' ../t.output

t-git-config dgit.default.clean-mode git

t-dgit clean | tee ../t.output

set +e
grep 'EXAMPLE RULES TARGET clean' ../t.output
rc=$?
set -e
test $rc = 1

git config dgit.default.clean-mode dpkg-source-d

t-dgit clean | tee ../t.output
grep 'EXAMPLE RULES TARGET clean' ../t.output

t-git-config dgit.default.opts-dpkg-buildpackage --dgit-fail-global
git config --add dgit.default.opts-dpkg-buildpackage --dgit-fail-foo
git config --add dgit.default.opts-dpkg-buildpackage --dgit-fail-bar

t-expect-fail '--dgit-fail-global --dgit-fail-foo --dgit-fail-bar' \
t-dgit clean

t-dgit -cdgit.default.clean-mode=none clean

t-ok