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/t9300-fast-import.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 't/t9300-fast-import.sh') diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 9e7f96223d..f8f869e26a 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -2191,12 +2191,11 @@ test_expect_success 'R: --import-marks-if-exists' ' test_expect_success 'R: feature import-marks-if-exists' ' rm -f io.marks && - >expect && git fast-import --export-marks=io.marks <<-\EOF && feature import-marks-if-exists=not_io.marks EOF - test_cmp expect io.marks && + test_must_be_empty io.marks && blob=$(echo hi | git hash-object --stdin) && @@ -2227,13 +2226,11 @@ test_expect_success 'R: feature import-marks-if-exists' ' EOF test_cmp expect io.marks && - >expect && - git fast-import --import-marks-if-exists=not_io.marks \ --export-marks=io.marks <<-\EOF && feature import-marks-if-exists=io.marks EOF - test_cmp expect io.marks + test_must_be_empty io.marks ' test_expect_success 'R: import to output marks works without any content' ' -- cgit v1.2.3