From f4cf700efd8bb44ca50f555e2ee04596fc690b91 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 3 Jun 2026 07:00:21 -0500 Subject: test: narrow the no-file-id assertion to :ID: specifically test-pearl-build-org-content-no-shared-file-id guards against pearl leaking a hardcoded file-level :ID: drawer. It checked for that two ways: the leaked id literal, and a blanket "no :PROPERTIES: drawer anywhere." The foldable help header (3336442) then started emitting a legitimate heading-level :PROPERTIES: :VISIBILITY: folded drawer, which the blanket check caught, so the test failed on correct output. Anchor the second assertion on :ID: instead. It still catches an id leak, alongside the unchanged literal check, while letting the help header's :VISIBILITY: drawer through. Test-only change; the rendered output was already correct. --- tests/test-pearl-format.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/test-pearl-format.el') diff --git a/tests/test-pearl-format.el b/tests/test-pearl-format.el index 491348a..ec0e1e0 100644 --- a/tests/test-pearl-format.el +++ b/tests/test-pearl-format.el @@ -157,11 +157,14 @@ sort together (org-sort on the parent) instead of being orphan headings." (should-not (string-match-p "^#\\+STARTUP: overview$" out))))) (ert-deftest test-pearl-build-org-content-no-shared-file-id () - "The file header carries no hardcoded org :ID: drawer." + "The file header carries no hardcoded org :ID: drawer. +Asserts against an :ID: property specifically rather than any :PROPERTIES: +drawer: the folded help header legitimately carries a :VISIBILITY: drawer, so a +blanket :PROPERTIES: check would catch that instead of an actual id leak." (test-pearl--with-default-mapping (let ((out (pearl--build-org-content '()))) (should-not (string-match-p "a12acb12" out)) - (should-not (string-match-p "^:PROPERTIES:$" out))))) + (should-not (string-match-p "^:ID:" out))))) (ert-deftest test-pearl-build-org-content-includes-each-issue () "Each issue contributes one heading to the rendered content." -- cgit v1.2.3