Re: [PATCH v2] ws: add new tab-between-non-ws check
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jan 8, 2026, 08:36 UTC
- Message-ID
- <5860c8ec-7b34-4c47-926e-67a2c44a654e@kdbg.org>
- In-Reply-To
- <87y0m9guns.fsf@collabora.com>
Am 07.01.26 um 19:11 schrieb Adrian Ratiu:
Show 22 quoted lines
> On Wed, 07 Jan 2026, Johannes Sixt <j6t@kdbg.org> wrote: >> Am 07.01.26 um 02:30 schrieb Adrian Ratiu: >>> + git add x && >>> + git diff --cached --check && >>> + >>> + git diff --cached --color >raw && >>> + test_decode_color <raw >actual && >>> + ! test_grep "<GREEN>1234567<RESET><BLUE> <RESET><GREEN>b<RESET>" actual && >> >> This must be >> >> test_grep ! "... >> >> Furthermore, a negative test with a very tight pattern is often not >> desired: The test could fail if any single character does not occur >> (which could easily happen if the test text is changed, but not this >> pattern). In this case, it would be sufficient to test only that "BLUE" >> does not occur. > > Thanks, I'm still a bit of a noob wrt the git codebase. Will do. > >>> + test_grep "<GREEN>1234567 b<RESET>" actual &&
Reconsidering this, we have a positive test for the desired result here. Then the negative test is redundant, I would think.
-- Hannes