summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 17:31:01 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 20:09:02 +0100
commit0c08383390e6759b14a8a825c736abd5ec555e0a (patch)
tree7cfec65c66fb1b250aedaa8d2f85fb7c32973575 /tests
parent066a68f06bfb3f17b31ff7244e21a00ddd6d48bb (diff)
git-debrebase: merge: gdr-merge test: Test an early failure too
And sort out the section comments. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/gdr-merge-conflicts45
1 files changed, 41 insertions, 4 deletions
diff --git a/tests/tests/gdr-merge-conflicts b/tests/tests/gdr-merge-conflicts
index afdd014..4517be4 100755
--- a/tests/tests/gdr-merge-conflicts
+++ b/tests/tests/gdr-merge-conflicts
@@ -8,7 +8,9 @@ t-dependencies NO-DGIT GDR
t-tstunt-parsechangelog
t-setup-import gdr-convert-gbp-noarchive
-: 'do a simple test'
+export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
+
+: ----- prepare the baseline -----
cd $p
@@ -18,26 +20,61 @@ git tag v2.1 upstream
t-some-changes before
t-git-debrebase quick
+: ===== early failure in walk =====
+
+: ----- prepare other -----
+
git checkout -b other
t-some-changes other '' -other
+git branch other-before-new-upstream
+
+t-git-debrebase new-upstream 2.1
+t-git-next-date
+
+: ----- prepare master -----
+
+git checkout master
+t-git-debrebase new-upstream 2.1
+t-git-next-date
+
+git branch master-before-merge
+
+: ----- make the merge -----
+
+git merge -s ours other
+
+# we have to do a little dance to make this not a pseudomerge
+t-git-next-date
+dch -a 'Merge, only conflict was in debian/changelog'
+t-dch-r-rune dch
+git commit -a --amend --no-edit
+
+t-expect-fail F:'divergent anchors' \
+t-git-debrebase
+
+: ===== late failure in apply =====
+
git checkout other
+git reset --hard other-before-new-upstream
+
echo other-upstream-confict >>docs/README
git commit -m 'other-upstream-conflict' docs/README
t-git-debrebase quick
+: ----- make the merge -----
+
git checkout master
-t-git-debrebase new-upstream 2.1
+git reset --hard master-before-merge
t-merge-conflicted-stripping-conflict-markers other docs/README
-export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
+: ----- expect failure -----
t-expect-fail F:'docs/README' \
t-git-debrebase
-# xxx want to test a nomerge from first walk analysis half
# xxx want to check wrecknotes appear
t-ok