emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 2a6f5cecf7 3/3: test-org: Add new test `test-org/or


From: ELPA Syncer
Subject: [elpa] externals/org 2a6f5cecf7 3/3: test-org: Add new test `test-org/org-find-olp'
Date: Sun, 8 May 2022 06:57:42 -0400 (EDT)

branch: externals/org
commit 2a6f5cecf7dda97e8121c2f4cb1033f7c294c196
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    test-org: Add new test `test-org/org-find-olp'
    
    * testing/lisp/test-org.el (test-org/org-find-olp): New test examining
    `org-find-olp'.
---
 testing/lisp/test-org.el | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index d79d7de519..0cee31d4e4 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -2319,6 +2319,31 @@
                                     ">>>>>>>>>>")
            ">>>>>>>>..")))
 
+(ert-deftest test-org/org-find-olp ()
+  "Test `org-find-olp' specifications."
+  (org-test-with-temp-text
+      "
+* Headline
+** COMMENT headline2
+** TODO headline3
+*** [#A] headline4 :tags:
+** [#A]headline5
+** [0%] headline6
+** headline7 [100%]
+** headline8 [1/5] :some:more:tags:
+* Test
+  "
+    (should (org-find-olp '("Headline") t))
+    (should-error (org-find-olp '("Headline" "Test") t))
+    (should-error (org-find-olp '("Headlinealksjd") t))
+    (should (org-find-olp '("Headline" "headline2") t))
+    (should (org-find-olp '("Headline" "headline3") t))
+    (should (org-find-olp '("Headline" "headline3" "headline4") t))
+    (should-error (org-find-olp '("Headline" "headline5") t))
+    (should (org-find-olp '("Headline" "headline6") t))
+    (should (org-find-olp '("Headline" "headline7") t))
+    (should (org-find-olp '("Headline" "headline8") t))))
+
 (ert-deftest test-org/map-entries ()
   "Test `org-map-entries' specifications."
   ;; Full match.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]