Re: [PATCH] diff: handle lines containing only whitespace better
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:49
Hmm, tests?
3 messages, 3 authors, 2016-06-15 · open the first message on its own page
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:49
Hmm, tests?
From: Kevin Ballard <hidden>
Date: 2016-06-15 22:49:49
On Oct 19, 2010, at 11:16 PM, Junio C Hamano wrote:
Hmm, tests?
I checked, there seem to be no existing tests for the whitespace highlighting output. All the tests just use `git diff --check` to see if it was caught. And given that the problem only occurs when it's emitting the colored highlighting, I wasn't sure how to go about adding tests for this as I'd need to create an expect file that contains all the same ansi color codes, and I thought that might be a bit fragile or hard to do correctly. Incidentally, I just realized the description of the patch is slightly wrong. The problem only occurs when the line contains at least one tab. Should I resend the patch with an updated description? I can also attempt to write tests if you can give me some guidance on how to deal with the need for ansi color codes. -Kevin Ballard
From: Nazri Ramliy <hidden>
Date: 2016-06-15 22:49:49
On Wed, Oct 20, 2010 at 2:38 PM, Kevin Ballard [off-list ref] wrote:
... I can also attempt to write tests if you can give me some guidance on how to deal with the need for ansi color codes.
Have a look at t/t4207-log-decoration-colors.sh for inspiration. nazri