chiark / gitweb /
test suite: Make expect_fsck_fail contain objids
[dgit.git] / tests / lib
index b7763056fa2cca759e115a1421b93c0b0bc534b5..fb9ee38b4ab113e27268a3391ec4bd14ba04d35f 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -349,7 +349,22 @@ t-git-dir-check () {
        esac
 }
 
+t-git-fsck () {
+       git fsck --no-dangling --strict || ${expect_fsck_fail:+true} false
+}
+
+t-fscks () {
+       (
+       shopt -s nullglob
+       for d in $tmp/*/.git $tmp/git/*.git; do
+               cd "$d"
+               t-git-fsck
+       done
+       )
+}
+
 t-ok () {
+       t-fscks
        echo ok.
 }