chiark / gitweb /
git-debrebase: test suite: introduce t-gdr-good
[dgit.git] / tests / lib-gdr
index f6333073cdf0ad42fedcdb672b05c5fa73ba2b7c..6d11009d8013ddf168d31a37a280d9f49fe76383 100644 (file)
@@ -12,13 +12,16 @@ t-git-debrebase () {
 '
 }
 
-t-gdr-branch-structure () {
+t-gdr-good () {
        local state=$1
+       local beforetag=$2 # say HEAD to skip this check
        # state should be one of
        #   laundered
        #   stitched
        #   patches
 
+       git diff ${beforetag-t.before} -- ':.' ':!debian/patches'
+
        local etype netype
 
        case $state in
@@ -88,3 +91,20 @@ t-gdr-branch-structure () {
 
        done
 }
+
+t-some-changes () {
+       local token=$1
+
+       echo >>debian/zorkmid "// debian $token"
+       git add debian/zorkmid
+       git commit -m "DEBIAN add zorkmid ($token)"
+
+       echo >>src.c "// upstream $token"
+       git commit -a -m "UPSTREAM edit src.c ($token)"
+
+       for f in debian/zorkmid src.c; do
+               echo "// both! $token" >>$f
+               git add $f
+       done
+       git commit -m "MIXED add both ($token)"
+}