From ca8d148daf3014577222c2562ca2c8170a866aa4 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 9 Jun 2013 11:29:20 -0700 Subject: test: test_must_be_empty helper There are quite a lot places where an output file is expected to be empty, and we fail the test when it is not. The output from running the test script with -i -v can be helped if we showed the unexpected contents at that point. We could of course do >expected.empty && test_cmp expected.empty actual but this is commmon enough to be done with a dedicated helper. Signed-off-by: Junio C Hamano --- t/t3400-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t3400-rebase.sh') diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 1de0ebda25..c1d2cbad2d 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -179,7 +179,7 @@ test_expect_success 'default to @{upstream} when upstream arg is missing' ' test_expect_success 'rebase -q is quiet' ' git checkout -b quiet topic && git rebase -q master >output.out 2>&1 && - test ! -s output.out + test_must_be_empty output.out ' test_expect_success 'Rebase a commit that sprinkles CRs in' ' -- cgit v1.2.1