From d3c6751b18170276f80e3578d16877d43ad22709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 27 Jul 2018 17:48:11 +0000 Subject: tests: make use of the test_must_be_empty function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change various tests that use an idiom of the form: >expect && test_cmp expect actual To instead use: test_must_be_empty actual The test_must_be_empty() wrapper was introduced in ca8d148daf ("test: test_must_be_empty helper", 2013-06-09). Many of these tests have been added after that time. This was mostly found with, and manually pruned from: git grep '^\s+>.*expect.* &&$' t Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- t/t5310-pack-bitmaps.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 't/t5310-pack-bitmaps.sh') diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh index 2d22a17c4a..6ee4d3f2d9 100755 --- a/t/t5310-pack-bitmaps.sh +++ b/t/t5310-pack-bitmaps.sh @@ -309,9 +309,8 @@ test_expect_success 'pack reuse respects --honor-pack-keep' ' done && reusable_pack --honor-pack-keep >empty.pack && git index-pack empty.pack && - >expect && git show-index actual && - test_cmp expect actual + test_must_be_empty actual ' test_expect_success 'pack reuse respects --local' ' @@ -319,17 +318,15 @@ test_expect_success 'pack reuse respects --local' ' test_when_finished "mv alt.git/objects/pack/* .git/objects/pack/" && reusable_pack --local >empty.pack && git index-pack empty.pack && - >expect && git show-index actual && - test_cmp expect actual + test_must_be_empty actual ' test_expect_success 'pack reuse respects --incremental' ' reusable_pack --incremental >empty.pack && git index-pack empty.pack && - >expect && git show-index actual && - test_cmp expect actual + test_must_be_empty actual ' test_expect_success 'truncated bitmap fails gracefully' ' -- cgit v1.2.3