summaryrefslogtreecommitdiff
path: root/t/t5319-multi-pack-index.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5319-multi-pack-index.sh')
-rwxr-xr-xt/t5319-multi-pack-index.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
index 43a7a66c9d..22240fd30b 100755
--- a/t/t5319-multi-pack-index.sh
+++ b/t/t5319-multi-pack-index.sh
@@ -42,10 +42,15 @@ test_expect_success 'setup' '
EOF
'
-test_expect_success 'write midx with no packs' '
- test_when_finished rm -f pack/multi-pack-index &&
- git multi-pack-index --object-dir=. write &&
- midx_read_expect 0 0 4 .
+test_expect_success "don't write midx with no packs" '
+ test_must_fail git multi-pack-index --object-dir=. write &&
+ test_path_is_missing pack/multi-pack-index
+'
+
+test_expect_success "Warn if a midx contains no oid" '
+ cp "$TEST_DIRECTORY"/t5319/no-objects.midx $objdir/pack/multi-pack-index &&
+ test_must_fail git multi-pack-index verify &&
+ rm $objdir/pack/multi-pack-index
'
generate_objects () {