chiark / gitweb /
test suite: t-some-changes: Allow control of which files are edited
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 10 Aug 2018 06:44:08 +0000 (07:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 10 Aug 2018 11:35:13 +0000 (12:35 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib-gdr

index 479ef414b08238c1262201e2161cb2fd30104a47..1bb810fef4445ed046d078973d3fd0312333bd62 100644 (file)
@@ -156,32 +156,34 @@ t-gdr-good () {
 
 t-some-changes () {
        local token=$1
-       local which=${2-dum}
+       local which=${2:-dum}
+       local fsuffix=$3
 
        t-git-next-date
 
        case "$which" in
        *d*)
-               echo >>debian/zorkmid "// debian $token"
-               git add debian/zorkmid
-               git commit -m "DEBIAN add zorkmid ($token)"
+               echo >>debian/zorkmid$fsuffix "// debian $token"
+               git add debian/zorkmid$fsuffix
+               git commit -m "DEBIAN add zorkmid$fsuffix ($token)"
                ;;
        esac
 
        case "$which" in
        *u*)
-               echo >>src.c "// upstream $token"
-               git commit -a -m "UPSTREAM edit src.c ($token)"
+               echo >>src$fsuffix.c "// upstream $token"
+               git add src$fsuffix.c
+               git commit -m "UPSTREAM edit src$fsuffix.c ($token)"
                ;;
        esac
 
        case "$which" in
        *m*)
-               for f in debian/zorkmid src.c; do
+               for f in debian/zorkmid$fsuffix src$fsuffix.c; do
                        echo "// both! $token" >>$f
                        git add $f
                done
-               git commit -m "MIXED add both ($token)"
+               git commit -m "MIXED add both($fsuffix) ($token)"
                ;;
        esac