summaryrefslogtreecommitdiff
path: root/t/t5303-pack-corruption-resilience.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-09 21:11:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-11-09 21:11:06 (GMT)
commita2d2c478f325690e1575e14e7d310fd7435d83be (patch)
treeaa9d05c4e460d692016d477275fde9be38d434d6 /t/t5303-pack-corruption-resilience.sh
parent8c1f6f6c5797d1a3fa9ec9d38ae30b4f19e70a3c (diff)
downloadgit-a2d2c478f325690e1575e14e7d310fd7435d83be.zip
git-a2d2c478f325690e1575e14e7d310fd7435d83be.tar.gz
git-a2d2c478f325690e1575e14e7d310fd7435d83be.tar.bz2
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>
Diffstat (limited to 't/t5303-pack-corruption-resilience.sh')
-rwxr-xr-xt/t5303-pack-corruption-resilience.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5303-pack-corruption-resilience.sh b/t/t5303-pack-corruption-resilience.sh
index f471ead..d4e30fc 100755
--- a/t/t5303-pack-corruption-resilience.sh
+++ b/t/t5303-pack-corruption-resilience.sh
@@ -234,7 +234,7 @@ test_expect_success \
'corruption #1 in delta base reference of first delta (OBJ_OFS_DELTA)' \
'create_new_pack --delta-base-offset &&
git prune-packed &&
- tr "\000" "\001" </dev/zero | do_corrupt_object $blob_2 2 &&
+ printf "\001" | do_corrupt_object $blob_2 2 &&
git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null'