]> git.ipfire.org Git - thirdparty/git.git/commit
userdiff: tighten word-diff test case of the scheme driver
authorJohannes Sixt <j6t@kdbg.org>
Wed, 15 Apr 2026 02:27:42 +0000 (02:27 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Apr 2026 15:43:33 +0000 (08:43 -0700)
commit955c88fbc5ac916f8dababa458a963ebbeba9b41
treed5599bc391baa8e9901a9ccbcc5b1efea8b05071
parent9f223ef1c026d91c7ac68cc0211bde255dda6199
userdiff: tighten word-diff test case of the scheme driver

The scheme driver separates identifiers only at parentheses of all
sorts and whitespace, except that vertical bars act as brackets that
enclose an identifier.

The test case attempts to demonstrate the vertical bars with a change
from 'some-text' to '|a greeting|'. However, this misses the goal
because the same word coloring would be applied if '|a greeting|'
were parsed as two words.

Have an identifier between vertical bars with a space in both the pre-
and the post-image and change only one side of the space to show that
the single word exists between the vertical bars.

Also add cases that change parentheses of all kinds in a sequence of
parentheses to show that they are their own word each.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Scott L. Burson <Scott@sympoiesis.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4034/scheme/expect
t/t4034/scheme/post
t/t4034/scheme/pre