chiark / gitweb /
test suite: Introduce t-expect-fsck-fail
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 5 Jan 2017 15:37:49 +0000 (15:37 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 5 Jan 2017 15:37:53 +0000 (15:37 +0000)
No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib
tests/tests/drs-push-rejects

index fb9ee38..569ca14 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -349,6 +349,10 @@ t-git-dir-check () {
        esac
 }
 
+t-expect-fsck-fail () {
+       expect_fsck_fail+=" $1"
+}
+
 t-git-fsck () {
        git fsck --no-dangling --strict || ${expect_fsck_fail:+true} false
 }
index 79d02b2..8c4ad83 100755 (executable)
@@ -85,7 +85,7 @@ for h in object type tag; do
 
     mustfail 'multiple headers '$h' in signed tag object' $push_spec
 
-    expect_fsck_fail+=" $badtag"
+    t-expect-fsck-fail $badtag
   done
 done
 
@@ -147,7 +147,7 @@ badcommit=$(
        perl -pe 's/^committer.*\n//' | \
        git hash-object -w -t commit --stdin
 )
-expect_fsck_fail+=" $badcommit"
+t-expect-fsck-fail $badcommit
 git checkout -b broken $badcommit
 prep unstable sid
 mktag