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'.
This commit is contained in:
Ihor Radchenko 2022-05-08 18:21:01 +08:00
parent a3d9999d28
commit 2a6f5cecf7
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 25 additions and 0 deletions

View File

@ -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.