From 03234a4d7d5c99e71fb0f1447acdb2241d58c7d8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 22 Jun 2018 17:34:50 +0100 Subject: test suite: lib-gdr: t-some-changes: Honour $2 `dum' This allows for less thorough but faster test cases. Signed-off-by: Ian Jackson --- tests/lib-gdr | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/lib-gdr b/tests/lib-gdr index 9eb7537..7b4f085 100644 --- a/tests/lib-gdr +++ b/tests/lib-gdr @@ -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 } -- cgit v1.2.3