Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH 2/3] test: improve rebase -q test

From: Jeff King <hidden>
Date: 2016-06-15 22:57:40

Possibly related (same subject, not in this thread)

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).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help