From 9deff2111b73bb2ceb9127db5d88486affa04f0b Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Thu, 18 Apr 2024 09:18:51 -0400 Subject: [PATCH] failing test --- testing/lisp/test-org-element.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 8b2cf1642..313556f49 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -4983,6 +4983,19 @@ Text ;;; Test Cache. +(ert-deftest test-org-element/cache-map () + "Test `org-element-cache-map'." + (org-test-with-temp-text "* headline\n:DRAWER:\nparagraph\n:END:\n* headline 2" + (should + (equal + '(org-data headline section drawer paragraph headline) + (org-element-cache-map #'car :granularity 'element)))) + (org-test-with-temp-text "* headline\n:DRAWER:\nparagraph\n:END:" + (should + (equal + ;; This fails because paragraph isn't found! + '(org-data headline section drawer paragraph) + (org-element-cache-map #'car :granularity 'element))))) (ert-deftest test-org-element/cache () "Test basic expectations and common pitfalls for cache." -- 2.41.0