X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft5530-upload-pack-error.sh;h=044603c26ed62e3ddf03ebb2542f783e4dd7d9ff;hb=01aedc930b6c3b46d229e33ac6f70b3d91fc1d2b;hp=a696b8791b7caa44ae2bd16d6970a791f3a28d3d;hpb=47344eee9b980a7cf2a08d040ff3dd38c6cd82ec;p=git.git
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh
index a696b8791..044603c26 100755
--- a/t/t5530-upload-pack-error.sh
+++ b/t/t5530-upload-pack-error.sh
@@ -32,9 +32,9 @@ test_expect_success 'fsck fails' '
test_expect_success 'upload-pack fails due to error in pack-objects packing' '
- ! echo "0032want $(git rev-parse HEAD)
-00000009done
-0000" | git upload-pack . > /dev/null 2> output.err &&
+ printf "0032want %s\n00000009done\n0000" \
+ $(git rev-parse HEAD) >input &&
+ test_must_fail git upload-pack . /dev/null 2>output.err &&
grep "unable to read" output.err &&
grep "pack-objects died" output.err
'
@@ -51,9 +51,9 @@ test_expect_success 'fsck fails' '
'
test_expect_success 'upload-pack fails due to error in rev-list' '
- ! echo "0032want $(git rev-parse HEAD)
-0034shallow $(git rev-parse HEAD^)00000009done
-0000" | git upload-pack . > /dev/null 2> output.err &&
+ printf "0032want %s\n0034shallow %s00000009done\n0000" \
+ $(git rev-parse HEAD) $(git rev-parse HEAD^) >input &&
+ test_must_fail git upload-pack . /dev/null 2>output.err &&
# pack-objects survived
grep "Total.*, reused" output.err &&
# but there was an error, which must have been in rev-list
@@ -62,9 +62,9 @@ test_expect_success 'upload-pack fails due to error in rev-list' '
test_expect_success 'upload-pack fails due to error in pack-objects enumeration' '
- ! echo "0032want $(git rev-parse HEAD)
-00000009done
-0000" | git upload-pack . > /dev/null 2> output.err &&
+ printf "0032want %s\n00000009done\n0000" \
+ $(git rev-parse HEAD) >input &&
+ test_must_fail git upload-pack . /dev/null 2>output.err &&
grep "bad tree object" output.err &&
grep "pack-objects died" output.err
'