chiark / gitweb /
git-debrebase: test suite: introduce t-gdr-same-as-before
[dgit.git] / tests / lib-gdr
index f6333073cdf0ad42fedcdb672b05c5fa73ba2b7c..cb937734dac3c205521683d9ffe6764c6b859e81 100644 (file)
@@ -12,6 +12,11 @@ t-git-debrebase () {
 '
 }
 
+t-gdr-same-as-before () {
+       local beforetag=$1
+       git diff ${beforetag-t.before} -- ':.' ':!debian/patches'
+}
+
 t-gdr-branch-structure () {
        local state=$1
        # state should be one of
@@ -88,3 +93,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)"
+}