@matheusbsbs / matheus-bagliano / commits / a2d2c478f3
Fork 0

t5303: fix printf format string for portability

printf "\x01" is bad; write printf "\001" for portability. Testing with dash is a good way to find this kind of POSIX.1 violation breakages. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Nov 9, 2008 at 13:11 UTC a2d2c478f325690e1575e14e7d310fd7435d83be
1 file changed +1 -1
t/t5303-pack-corruption-resilience.sh
+1 -1
@@ -234,7 +234,7 @@ test_expect_success \
234 'corruption #1 in delta base reference of first delta (OBJ_OFS_DELTA)' \
235 'create_new_pack --delta-base-offset &&
236 git prune-packed &&
237 - tr "\000" "\001" </dev/zero | do_corrupt_object $blob_2 2 &&
237 + printf "\001" | do_corrupt_object $blob_2 2 &&
238 git cat-file blob $blob_1 > /dev/null &&
239 test_must_fail git cat-file blob $blob_2 > /dev/null &&
240 test_must_fail git cat-file blob $blob_3 > /dev/null'