]> git.ipfire.org Git - thirdparty/git.git/commit - t/test-lib-functions.sh
test: test_must_be_empty helper
authorJunio C Hamano <gitster@pobox.com>
Sun, 9 Jun 2013 18:29:20 +0000 (11:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 9 Jun 2013 23:45:14 +0000 (16:45 -0700)
commitca8d148daf3014577222c2562ca2c8170a866aa4
treed3225e86102154d591d8b25336eb4166c32efd0a
parentb1d04bfcf84cc3464d0bdf62b02443d0d55e3f2b
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>
t/t0040-parse-options.sh
t/t3400-rebase.sh
t/t3903-stash.sh
t/t5521-pull-options.sh
t/t5702-clone-options.sh
t/t7102-reset.sh
t/t7400-submodule-basic.sh
t/t9402-git-cvsserver-refs.sh
t/test-lib-functions.sh