summaryrefslogtreecommitdiff
path: root/t/lib-midx.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/lib-midx.sh')
-rw-r--r--t/lib-midx.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/lib-midx.sh b/t/lib-midx.sh
new file mode 100644
index 0000000000..1261994744
--- /dev/null
+++ b/t/lib-midx.sh
@@ -0,0 +1,8 @@
+# test_midx_consistent <objdir>
+test_midx_consistent () {
+ ls $1/pack/pack-*.idx | xargs -n 1 basename | sort >expect &&
+ test-tool read-midx $1 | grep ^pack-.*\.idx$ | sort >actual &&
+
+ test_cmp expect actual &&
+ git multi-pack-index --object-dir=$1 verify
+}