aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pearl-org-write.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 16:43:00 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 16:43:00 -0500
commitd03d5582197def92ad72e113815a3c4836da1330 (patch)
tree16901e08fcd7940a864799918e523176dcf0e157 /tests/test-pearl-org-write.el
parent0e3c7b23f610834b1300ef0821e2a5978201fbf6 (diff)
downloadpearl-d03d5582197def92ad72e113815a3c4836da1330.tar.gz
pearl-d03d5582197def92ad72e113815a3c4836da1330.zip
feat: render issue headings with the identifier prefix and title case
I added two display-only heading tweaks, each a defcustom defaulting on. pearl-show-identifier-in-heading prefixes the title with the Linear identifier (** TODO [#B] SE-401: Fix the Bug). pearl-title-case-headings renders the title in smart title case, keeping minor words lowercase unless first or last and leaving words that already carry an uppercase letter (acronyms, identifiers) untouched. Both stay display-only. The LINEAR-TITLE-SHA256 hash covers the rendered (cased, un-prefixed) title, and the title-sync reader strips the identifier prefix before hashing, so an unedited heading is a no-op and neither the casing nor the prefix ever pushes to Linear. A render-then-read round-trip test locks that invariant.
Diffstat (limited to 'tests/test-pearl-org-write.el')
-rw-r--r--tests/test-pearl-org-write.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-pearl-org-write.el b/tests/test-pearl-org-write.el
index bd06ef0..6491b54 100644
--- a/tests/test-pearl-org-write.el
+++ b/tests/test-pearl-org-write.el
@@ -55,7 +55,7 @@ The state mapping is bound so rendering is deterministic."
(let ((content (with-temp-buffer (insert-file-contents tmp) (buffer-string))))
(should (string-match-p "#\\+title: Linear" content))
(should (string-match-p "#\\+LINEAR-SOURCE: " content))
- (should (string-match-p "\\*\\* TODO \\[#C\\] T" content)))))
+ (should (string-match-p "\\*\\* TODO \\[#C\\] ENG-1: T" content)))))
(ert-deftest test-pearl-update-org-clean-buffer-replaces-contents ()
"A clean visiting buffer is replaced in place and saved."
@@ -67,7 +67,7 @@ The state mapping is bound so rendering is deterministic."
(pearl--update-org-from-issues test-pearl--sample-issues)
(with-current-buffer buf
(should-not (buffer-modified-p))
- (should (string-match-p "\\*\\* TODO \\[#C\\] T" (buffer-string)))
+ (should (string-match-p "\\*\\* TODO \\[#C\\] ENG-1: T" (buffer-string)))
(should-not (string-match-p "old content" (buffer-string)))))))
(ert-deftest test-pearl-update-org-dirty-buffer-not-overwritten ()