mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(tests): add test for headline extraction (#840)
This commit is contained in:
@ -225,6 +225,26 @@
|
||||
:to-equal
|
||||
'("t1" "t2 with space" "t3" "tags"))))))
|
||||
|
||||
(describe "Headline extraction"
|
||||
(before-all
|
||||
(test-org-roam--init))
|
||||
|
||||
(after-all
|
||||
(test-org-roam--teardown))
|
||||
|
||||
(cl-flet
|
||||
((test (fn file)
|
||||
(let* ((fname (test-org-roam--abs-path file))
|
||||
(buf (find-file-noselect fname)))
|
||||
(with-current-buffer buf
|
||||
(funcall fn fname)))))
|
||||
(it "extracts headlines"
|
||||
(expect (test #'org-roam--extract-headlines
|
||||
"headlines/headline.org")
|
||||
:to-equal
|
||||
`(["e84d0630-efad-4017-9059-5ef917908823" ,(test-org-roam--abs-path "headlines/headline.org")]
|
||||
["801b58eb-97e2-435f-a33e-ff59a2f0c213" ,(test-org-roam--abs-path "headlines/headline.org")])))))
|
||||
|
||||
;;; Tests
|
||||
(xdescribe "org-roam-db-build-cache"
|
||||
(before-each
|
||||
|
Reference in New Issue
Block a user