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/t5702-clone-options.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t5702-clone-options.sh') diff --git a/t/t5702-clone-options.sh b/t/t5702-clone-options.sh index 02cb024723..85cadfad6d 100755 --- a/t/t5702-clone-options.sh +++ b/t/t5702-clone-options.sh @@ -22,7 +22,7 @@ test_expect_success 'clone -o' ' test_expect_success 'redirected clone' ' git clone "file://$(pwd)/parent" clone-redirected >out 2>err && - test ! -s err + test_must_be_empty err ' test_expect_success 'redirected clone -v' ' -- cgit v1.2.3