Re: [PATCH v2 09/27] userdiff tests: match full hunk headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 24.02.21 um 12:12 schrieb Ævar Arnfjörð Bjarmason:
> 
> 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.

> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux