Re: [PATCH v2] git-send-email: Use sanitized address when reading mbox body
- From
- Csókás Bence <csokas.bence@prolan.hu>
- Date
- Jun 27, 2024, 08:37 UTC
- Message-ID
- <f245c5e8-b986-49f1-91fe-7e24593e8e85@prolan.hu>
- In-Reply-To
- <xmqqy16r1ulu.fsf@gitster.g>
On 6/26/24 19:28, Junio C Hamano wrote:
Show 8 quoted lines
>> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh >> index 58699f8e4e..7e0b8ae57c 100755 >> --- a/t/t9001-send-email.sh >> +++ b/t/t9001-send-email.sh > > This test uses mixture of test_grep and grep, so use of "grep" below > is fine (but in the longer term we should make sure the tests use > the former for better debuggability).
Ok, I'll use test_grep everywhere.
Show 9 quoted lines
> As I always say, we should resist the temptation to write our tests > just to demonstrate our shiny new toy. In this case, the test is > too focused to show that the system will give a best-effort output > when fed invalid and/or malformed addresses, but it does not see > what happens to a well formed addresses (ideally they are passed > intact, but is that what happens with the new code?). Perhaps add > one or two trailer lines with valid addresses (and non-address, like > "BugId: 143421", that should not appear at all in the output) on > them?
Valid addresses are already tested by former tests. I don't immediately see any tests that would cover non-Cc, non-*-by and non-email-address tags, so I might add them; should they be a separate testcase or part of this one? Or maybe even a separate patch?
Bence