chiark / gitweb /
changelog: finalise 5.7
[dgit.git] / tests / lib-gdr
index 9eb75371102f14e4648f8bef5d12f0d907c462db..22ea6d1fa88bab61758b410d47dcd3bf2951652b 100644 (file)
@@ -141,7 +141,7 @@ t-gdr-good () {
                test $cnparents = $enparents
 
                local cndparents=`
-       for f in $parents; do echo $f; done | sort -u | wc -w
+       for f in $parents; do echo $f; done | t-sort -u | wc -w
                                `
                test $cndparents = $cnparents
 
@@ -155,21 +155,34 @@ t-gdr-good () {
 
 t-some-changes () {
        local token=$1
+       local which=${2-dum}
 
        t-git-next-date
 
-       echo >>debian/zorkmid "// debian $token"
-       git add debian/zorkmid
-       git commit -m "DEBIAN add zorkmid ($token)"
+       case "$which" in
+       *d*)
+               echo >>debian/zorkmid "// debian $token"
+               git add debian/zorkmid
+               git commit -m "DEBIAN add zorkmid ($token)"
+               ;;
+       esac
 
-       echo >>src.c "// upstream $token"
-       git commit -a -m "UPSTREAM edit src.c ($token)"
+       case "$which" in
+       *u*)
+               echo >>src.c "// upstream $token"
+               git commit -a -m "UPSTREAM edit src.c ($token)"
+               ;;
+       esac
 
-       for f in debian/zorkmid src.c; do
-               echo "// both! $token" >>$f
-               git add $f
-       done
-       git commit -m "MIXED add both ($token)"
+       case "$which" in
+       *m*)
+               for f in debian/zorkmid src.c; do
+                       echo "// both! $token" >>$f
+                       git add $f
+               done
+               git commit -m "MIXED add both ($token)"
+               ;;
+       esac
 
        t-git-next-date
 }