From: Johannes Sixt Date: Thu, 08 Jan 2026 08:36:36 GMT Subject: Re: [PATCH v2] ws: add new tab-between-non-ws check 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: > On Wed, 07 Jan 2026, Johannes Sixt 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 actual && >>> + ! test_grep "1234567 b" 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 "1234567 b" actual && Reconsidering this, we have a positive test for the desired result here. Then the negative test is redundant, I would think. -- Hannes