Code

Merge branch 'np/maint-safer-pack' into np/pack
[git.git] / t / t5300-pack-object.sh
index 007b136fe64b1afb6b398dd3a2790aeabc2bd127..83abe5f25eb4eb0627d47c233be27f1dd77d4455 100755 (executable)
@@ -15,7 +15,7 @@ test_expect_success \
     'rm -f .git/index*
      for i in a b c
      do
-            dd if=/dev/zero bs=4k count=1 | tr "\\000" $i >$i &&
+            dd if=/dev/zero bs=4k count=1 | perl -pe "y/\\000/$i/" >$i &&
             git update-index --add $i || return 1
      done &&
      cat c >d && echo foo >>d && git update-index --add d &&
@@ -186,6 +186,12 @@ test_expect_success \
                        test-2-${packname_2}.idx \
                        test-3-${packname_3}.idx'
 
+test_expect_success \
+    'verify pack -v' \
+    'git verify-pack -v        test-1-${packname_1}.idx \
+                       test-2-${packname_2}.idx \
+                       test-3-${packname_3}.idx'
+
 test_expect_success \
     'verify-pack catches mismatched .idx and .pack files' \
     'cat test-1-${packname_1}.idx >test-3.idx &&
@@ -266,7 +272,7 @@ test_expect_success \
 
 test_expect_success \
     'make sure index-pack detects the SHA1 collision' \
-    '! git-index-pack -o bad.idx test-3.pack'
+    'test_must_fail git-index-pack -o bad.idx test-3.pack'
 
 test_expect_success \
     'honor pack.packSizeLimit' \