Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-09 22:29:20 +0400
committerJunio C Hamano <gitster@pobox.com>2013-06-10 03:45:14 +0400
commitca8d148daf3014577222c2562ca2c8170a866aa4 (patch)
treed3225e86102154d591d8b25336eb4166c32efd0a /t/t7102-reset.sh
parentb1d04bfcf84cc3464d0bdf62b02443d0d55e3f2b (diff)
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 <gitster@pobox.com>
Diffstat (limited to 't/t7102-reset.sh')
-rwxr-xr-xt/t7102-reset.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index df82ec9dda..300be86c38 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -457,7 +457,7 @@ test_expect_success 'disambiguation (1)' '
test_must_fail git diff --quiet -- secondfile &&
test -z "$(git diff --cached --name-only)" &&
test -f secondfile &&
- test ! -s secondfile
+ test_must_be_empty secondfile
'