summaryrefslogtreecommitdiff
path: root/tests/tests/gdr-unprocessable
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests/gdr-unprocessable')
-rwxr-xr-xtests/tests/gdr-unprocessable60
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/tests/gdr-unprocessable b/tests/tests/gdr-unprocessable
new file mode 100755
index 0000000..caa5321
--- /dev/null
+++ b/tests/tests/gdr-unprocessable
@@ -0,0 +1,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