Re: [PATCH] t4018: introduce test cases for the internal hunk header patterns
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 19, 2011, 23:17 UTC
- Message-ID
- <7vmxaokv6k.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CA+sFfMeogJ==ud6NdPj_KZFUKFeB--RBmPkLndjrQwhg15V5ig@mail.gmail.com>
Brandon Casey <drafnel@gmail.com> writes:
Show 7 quoted lines
>> * after the line that contains "RIGHT" token, there should be one (and >> only one) line that contains "ChangeMe". The test modifies this >> token to "IWasChanged", compares the original with the modified >> result, and expects the "RIGHT" token above appears on the hunk >> header. > > Both good improvements.
Let's not call "ChangeMe" a *token*, as I think the easiest example would look like the following and it would not use it as such. Rephrasing it as a "string" would be better.
@@ ... @@ int RIGHT_function_hunk_header(void)
int RIGHT_function_hunk_header(void)
{
- const char *msg = "ChangeME";
+ const char *msg = "IWasChanged";
printf("Hello, world, %s\n", msg);
return 0;
}
@@ ...