On Sun, Jun 09, 2013 at 11:30:01AM -0700, Junio C Hamano wrote:

> -- >8 --
> Subject: [PATCH] test: test_output_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.

Thanks, I think this improves the readability of the test suite (and its
output when there are failures).

You can also do:

  test_cmp /dev/null actual

for the same effect, but I guess the diff is not all that interesting
(by definition, it would consist only of added lines, and you are
already showing them, so it would not be an improvement).

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to