Add test for `org-refile-get-targets'
* testing/lisp/test-org.el (test-org/refile-get-targets): Add test.
This commit is contained in:
parent
cadbef99f0
commit
36a091fe67
|
@ -5395,7 +5395,7 @@ Paragraph<point>"
|
|||
(org-refile-targets nil))
|
||||
(mapcar #'car (org-refile-get-targets))))))
|
||||
;; Return value is the union of the targets according to all the
|
||||
;; defined rules.
|
||||
;; defined rules. However, prevent duplicates.
|
||||
(should
|
||||
(equal '("F2" "F3" "H1")
|
||||
(org-test-with-temp-text "* TODO H1\n** F2\n*** F3"
|
||||
|
@ -5403,6 +5403,13 @@ Paragraph<point>"
|
|||
(org-refile-targets `((nil :regexp . "F")
|
||||
(nil :todo . "TODO"))))
|
||||
(mapcar #'car (org-refile-get-targets))))))
|
||||
(should
|
||||
(equal '("F3" "H1" "F2")
|
||||
(org-test-with-temp-text "* TODO H1\n** TODO F2\n*** F3"
|
||||
(let ((org-refile-use-outline-path nil)
|
||||
(org-refile-targets `((nil :regexp . "F")
|
||||
(nil :todo . "TODO"))))
|
||||
(mapcar #'car (org-refile-get-targets))))))
|
||||
;; When `org-refile-use-outline-path' is non-nil, provide targets as
|
||||
;; paths.
|
||||
(should
|
||||
|
|
Loading…
Reference in New Issue