chiark / gitweb /
Test suite: Provide t-gbp-example-prep [FOLD INTO QUILT-GBP TEST?]
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jul 2016 14:57:01 +0000 (15:57 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jul 2016 15:47:48 +0000 (16:47 +0100)
This function is useful for setting up a test case --quilt=gbp working
tree and corresponding archive contents, ready for substantive tests.

tests/lib

index 0b88362..c51c4a6 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -534,6 +534,27 @@ t-gbp-unapplied-pq2qc () {
        git checkout patch-queue/$branch
 }
 
+t-gbp-example-prep () {
+       t-archive example 1.0-1
+       t-git-none
+       t-worktree 1.0
+
+       cd example
+
+       t-dgit fetch
+
+       git-checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip
+       gbp pq rebase
+
+       echo '/* some comment */' >>src.c
+       git add src.c
+       git commit -m 'Add a comment to an upstream file'
+
+       t-gbp-unapplied-pq2qc
+
+       t-commit 'some updates' 1.0-2
+}
+
 t-commit () {
        local msg=$1
        v=${2-1.$revision}