Re: [PATCH 03/10] t4018: an infrastructure to test hunk headers

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

 



Am 24.03.2014 22:39, schrieb Jeff King:
> On Mon, Mar 24, 2014 at 05:36:59PM -0400, Jeff King wrote:
> 
>>> +How to write RIGHT test cases
>>> +=============================
>>> +
>>> +Insert the word "ChangeMe" (exactly this form) at a distance of
>>> +at least two lines from the line that must appear in the hunk header.
>>
>> The existing tests use -U1 to make writing cases simpler. Is there a
>> reason not to continue that (or if you found that porting the existing
>> cases was not a chore with -U3, I can buy that argument, too)?
> 
> I take it back. You did keep "-U1" in the result. Is this "two lines"
> rule necessary, then?

When we have

   one
   two
   three

how would you describe the distance between "one" and "three"?

Or do you have a wrong expectation how we determine the hunk header? The
hunk header is searched in the text *before* the pre-context. Therefore,
we need at least as many lines between the intended hunk header line
(with tag RIGHT) and the changed line (ChangeMe) as we request with -U
for the context.

So: yes, we need the rule.

-- Hannes

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




[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]