blob: caa5321f899c6498de46d5258982454d224018c8 (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#!/bin/bash
set -e
. tests/lib
t-dependencies GDR
t-setup-import gdr-convert-gbp
cd $p
t-dgit setup-mergechangelogs
subcmd () {
cmd=("$@")
branch merge 'complex merge'
branch origin 'origin commit'
}
branch () {
branch=$1
git checkout gdr-unprocessable/$branch
msgcore=$2
expected-$expected
}
cmd () {
t-git-debrebase "${cmd[@]}"
}
expected- () {
t-expect-fail E:"$(printf "$mfmt" "$msgcore")" \
cmd
}
expected-ok () {
f=../out.$branch."${cmd/[^-a-zA-Z//_}"
cmd | tee $f
for mfmt in "${mfmts[@]}"; do
grep "$(printf "$mfmt" "$msgcore")" $f
done
}
mfmt='found unprocessable commit.*%s'
subcmd
subcmd quick
subcmd new-upstream 2.0 upstream/2.0
subcmd make-patches
subcmd breakwater
subcmd anchor
expected=ok
mfmts=(' Unprocessable (%s)')
subcmd analyse
mfmts=('branch not in git-debrebase form'
'found unprocessable commit, cannot cope: %s')
subcmd status
t-ok
|