t5300: improve SHA1 collision test
authorNicolas Pitre <nico@cam.org>
Tue, 2 Sep 2008 14:22:22 +0000 (10:22 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Sep 2008 00:05:56 +0000 (17:05 -0700)
Make sure the reason for the command failure is actually due to
the detection of SHA1 collision.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5300-pack-object.sh

index 83abe5f25eb4eb0627d47c233be27f1dd77d4455..8a8b0f1abae5ceeba99eef36a330b6839794145c 100755 (executable)
@@ -272,7 +272,8 @@ test_expect_success \
 
 test_expect_success \
     'make sure index-pack detects the SHA1 collision' \
-    'test_must_fail git-index-pack -o bad.idx test-3.pack'
+    'test_must_fail git-index-pack -o bad.idx test-3.pack 2>msg &&
+     grep "SHA1 COLLISION FOUND" msg'
 
 test_expect_success \
     'honor pack.packSizeLimit' \