summaryrefslogtreecommitdiff
path: root/tests/tests/gdr-newupstream-v0
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-02-18 14:35:48 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-16 16:06:59 +0100
commit25ddd3eaafb2723913b6bf187596b46ec6ec3ba3 (patch)
tree30a71ce4d0c926e6d00c600cae57062e2f841e15 /tests/tests/gdr-newupstream-v0
parent4b9de539daea1c590687fcf144b0f36cc99609ed (diff)
git-debrebase: test suite: test --anchor option
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests/gdr-newupstream-v0')
-rwxr-xr-xtests/tests/gdr-newupstream-v027
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/tests/gdr-newupstream-v0 b/tests/tests/gdr-newupstream-v0
index 7bd017b..1c3147e 100755
--- a/tests/tests/gdr-newupstream-v0
+++ b/tests/tests/gdr-newupstream-v0
@@ -23,14 +23,37 @@ new-upstream 2.1
: 'maintainer hat'
-git checkout master
-
+git branch startpoint
v=2.1-1
+git checkout master
+
t-git-debrebase new-upstream-v0 $v
t-gdr-good laundered
t-git-debrebase stitch
t-gdr-good stitched
+git branch ordinary
+
+: 'with --anchor'
+
+git reset --hard startpoint
+t-git-next-date
+
+t-git-debrebase analyse >../anal.anch
+anchor=$(perl <../anal.anch -ne '
+ next unless m/^(\w+) Anchor\s/;
+ print $1,"\n";
+ exit;
+')
+
+t-git-debrebase --anchor=$anchor -fanchor-treated new-upstream-v0 $v
+t-gdr-good laundered
+
+t-git-debrebase stitch
+t-gdr-good stitched
+
+git diff --quiet ordinary
+
t-ok