Re: [PATCH v2 09/27] userdiff tests: match full hunk headers
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Feb 24, 2021, 17:13 UTC
- Message-ID
- <b8c26fac-85e7-8565-7469-6b3fe965a570@kdbg.org>
- In-Reply-To
- <87y2fd7m90.fsf@evledraar.gmail.com>
Am 24.02.21 um 12:12 schrieb Ævar Arnfjörð Bjarmason:
Show 10 quoted lines
> > On Tue, Feb 23 2021, Johannes Sixt wrote: >> I could live with a version of Junio's suggestion that is not opt-in, >> i.e., the checks are mandatory and exact. The important point is that >> there is only one file per test case; that would still count as >> "sufficiently simple" in my book. > > So something where the tests in 14-15,17,19/27 would need to go back to > having the config that's part of the test driven by setup in > t/t4018-diff-funcname.sh,
I'm afraid, I don't understand what you mean by this sentence. Do you mean "not do the refactoring like in those patches"? Yes, that would likely be unnecessary churn.
Show 11 quoted lines
> and the contents of a test file being e.g. (to > take the test from 25/27): > > # HEADER |package main| > package main > > import "fmt" > // ChangeMe > > ? >
Yes. Except that I would move the "expected text" part to the end of the file so that there is no danger that it is mistaken as a hunk header (in case that a pattern is so loose that it matches that line).
-- Hannes