From: "Johannes Sixt via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Johannes Sixt" <j6t@kdbg.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Jaydeep P Das" <jaydeepjd.8914@gmail.com>,
"D. Ben Knoble" <ben.knoble@gmail.com>,
"Scott L. Burson" <Scott@sympoiesis.com>,
"Johannes Sixt" <j6t@kdbg.org>
Subject: [PATCH v3 1/2] userdiff: tighten word-diff test case of the scheme driver
Date: Thu, 15 Jan 2026 23:18:39 +0000 [thread overview]
Message-ID: <e20ac5b6a6257e909fc676f6472230540268146b.1768519120.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2000.v3.git.1768519120.gitgitgadget@gmail.com>
From: Johannes Sixt <j6t@kdbg.org>
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>
---
t/t4034/scheme/expect | 5 +++--
t/t4034/scheme/post | 1 +
t/t4034/scheme/pre | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/t/t4034/scheme/expect b/t/t4034/scheme/expect
index 496cd5de8c..138abe9f56 100644
--- a/t/t4034/scheme/expect
+++ b/t/t4034/scheme/expect
@@ -2,10 +2,11 @@
<BOLD>index 74b6605..63b6ac4 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
-<CYAN>@@ -1,6 +1,6 @@<RESET>
+<CYAN>@@ -1,7 +1,7 @@<RESET>
(define (<RED>myfunc a b<RESET><GREEN>my-func first second<RESET>)
; This is a <RED>really<RESET><GREEN>(moderately)<RESET> cool function.
(<RED>this\place<RESET><GREEN>that\place<RESET> (+ 3 4))
- (define <RED>some-text<RESET><GREEN>|a greeting|<RESET> "hello")
+ (define <RED>|the greeting|<RESET><GREEN>|a greeting|<RESET> "hello")
+ ({<RED>}<RESET>(([<RED>]<RESET>(func-n)<RED>[<RESET>]))<RED>{<RESET>})
(let ((c (<RED>+ a b<RESET><GREEN>add1 first<RESET>)))
(format "one more than the total is %d" (<RED>add1<RESET><GREEN>+<RESET> c <GREEN>second<RESET>))))
diff --git a/t/t4034/scheme/post b/t/t4034/scheme/post
index 63b6ac4f87..0e3bab101d 100644
--- a/t/t4034/scheme/post
+++ b/t/t4034/scheme/post
@@ -2,5 +2,6 @@
; This is a (moderately) cool function.
(that\place (+ 3 4))
(define |a greeting| "hello")
+ ({(([(func-n)]))})
(let ((c (add1 first)))
(format "one more than the total is %d" (+ c second))))
diff --git a/t/t4034/scheme/pre b/t/t4034/scheme/pre
index 74b6605357..03d77c7c43 100644
--- a/t/t4034/scheme/pre
+++ b/t/t4034/scheme/pre
@@ -1,6 +1,7 @@
(define (myfunc a b)
; This is a really cool function.
(this\place (+ 3 4))
- (define some-text "hello")
+ (define |the greeting| "hello")
+ ({}(([](func-n)[])){})
(let ((c (+ a b)))
(format "one more than the total is %d" (add1 c))))
--
gitgitgadget
next prev parent reply other threads:[~2026-01-15 23:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-15 10:17 [PATCH] diff: "lisp" userdiff_driver Scott L. Burson via GitGitGadget
2025-11-15 17:06 ` Johannes Sixt
2025-11-15 23:32 ` Scott L. Burson
2025-11-20 16:47 ` D. Ben Knoble
2025-11-27 2:10 ` Scott L. Burson
2025-11-16 5:30 ` Junio C Hamano
2025-11-17 23:23 ` Scott L. Burson
2025-11-18 4:38 ` Junio C Hamano
2025-11-27 2:38 ` [PATCH v2 0/2] userdiff: extend Scheme support to cover other Lisp dialects Scott L. Burson via GitGitGadget
2025-11-27 2:38 ` [PATCH v2 1/2] diff: "lisp" userdiff_driver Scott L. Burson via GitGitGadget
2025-11-27 10:32 ` Scott L. Burson
2025-11-27 10:51 ` Johannes Sixt
2025-11-27 2:38 ` [PATCH v2 2/2] merge with Scheme regexp; fix bugs Scott L. Burson via GitGitGadget
2025-11-27 16:09 ` Johannes Sixt
2025-12-02 10:27 ` Johannes Sixt
2026-01-14 6:18 ` Scott L. Burson
2026-01-14 8:40 ` Johannes Sixt
2026-01-15 23:18 ` [PATCH v3 0/2] userdiff: extend Scheme support to cover other Lisp dialects Scott L. Burson via GitGitGadget
2026-01-15 23:18 ` Johannes Sixt via GitGitGadget [this message]
2026-01-15 23:18 ` [PATCH v3 2/2] " Scott L. Burson via GitGitGadget
2026-01-16 8:49 ` Johannes Sixt
2026-01-17 2:09 ` Scott L. Burson
2026-01-17 8:15 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e20ac5b6a6257e909fc676f6472230540268146b.1768519120.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=Scott@sympoiesis.com \
--cc=avarab@gmail.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jaydeepjd.8914@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox