diff options
author | Johannes Sixt <j6t@kdbg.org> | 2010-03-06 16:40:38 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-07 00:37:35 -0800 |
commit | 1d8cd418b49f08146d6d47cf8881965f922686cb (patch) | |
tree | 085b77f487fe448ca44dc34589692630ad896688 /t | |
parent | Merge branch 'maint' (diff) | |
download | tgif-1d8cd418b49f08146d6d47cf8881965f922686cb.tar.xz |
Modernize t5530-upload-pack-error.
Some tests did not use test_must_fail.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5530-upload-pack-error.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh index a696b8791b..044603c26e 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 . <input >/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 . <input >/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 . <input >/dev/null 2>output.err && grep "bad tree object" output.err && grep "pack-objects died" output.err ' |