Re: [PATCH 2/6] t7408: merge short tests, factor out testing method
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 5, 2016, 23:09 UTC
- Message-ID
- <xmqqwpjuu82s.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kZChXebtSJeTPGoZgnoKySDrWnD11NX7fyze+rOU=Jwvg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 8 quoted lines
>>> -test_expect_success 'that reference gets used with add' ' >>> - ( >>> - cd super/sub && >>> - echo "0 objects, 0 kilobytes" > expected && >>> - git count-objects > current && >>> - diff expected current > > This is where the "diff" and "current" above came from.
I KNOW that, but I thought this effort is a continuation of the modernise-and-make-it-maintainable effort started at 1/6.
> To stop that from happening again I want to have a clean slate, > i.e. all clones are deleted shortly after using, so it is obvious what > to use for testing.
OK. So A, B and super (and super/sub) are the ones that survive throughout the test, and individual test (including the "let's try cloning the super into super-clone" at the end of existing tests) would follow create-use-remove pattern? Perhaps that can be left as a comment before the last existing test, e.g. "A, B and super are permanent, and from here on, if you create a clone of them for testing, remove your clone once you are done", to inform the test writers of this convention.
Thanks.