mirror of
https://github.com/correl/org-roam-export-backlinks.git
synced 2024-11-23 03:00:16 +00:00
Add additional tests
This commit is contained in:
parent
a29587131f
commit
8664922bb2
2 changed files with 15 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
:END:
|
||||
#+title: Lorem
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eget viverra mi.
|
||||
Lorem [[id:e6c17c1a-6b05-40d2-a01f-b147633c51b1][ipsum]] dolor sit amet, consectetur adipiscing elit. Mauris eget viverra mi.
|
||||
Duis eget dui id tellus fermentum vehicula. Duis tincidunt quam vel erat
|
||||
bibendum commodo. Phasellus in justo vitae magna commodo rhoncus id quis justo.
|
||||
Morbi id malesuada nisi. Praesent ipsum velit, commodo vel bibendum vitae,
|
||||
|
|
14
tests.el
14
tests.el
|
@ -27,6 +27,10 @@
|
|||
(should (equal '("Ipsum > II")
|
||||
(mapcar #'org-roam-export-backlink-title (org-roam-backlinks-get (org-roam-node-from-id "d12a1ce4-3199-42f4-b39b-b68c03458669") :unique t)))))
|
||||
|
||||
(ert-deftest ipsum-backlink-titles ()
|
||||
(should (equal '("Lorem")
|
||||
(mapcar #'org-roam-export-backlink-title (org-roam-backlinks-get (org-roam-node-from-id "e6c17c1a-6b05-40d2-a01f-b147633c51b1") :unique t)))))
|
||||
|
||||
(ert-deftest lorem-backlink-excerpt ()
|
||||
(should (equal '("Aliquam [[id:d12a1ce4-3199-42f4-b39b-b68c03458669][lorem]] ante, suscipit a lorem molestie, aliquet elementum eros. Proin
|
||||
mattis lacus nec dapibus auctor. Donec lacinia finibus ex vitae tempor.
|
||||
|
@ -40,5 +44,15 @@ auctor, ligula justo varius dolor, id bibendum nulla elit ac dui. Vestibulum
|
|||
sodales enim eget tristique tempor.")
|
||||
(mapcar #'org-roam-export-backlink-excerpt (org-roam-backlinks-get (org-roam-node-from-id "d12a1ce4-3199-42f4-b39b-b68c03458669") :unique t)))))
|
||||
|
||||
(ert-deftest ipsum-backlink-excerpt ()
|
||||
(should (equal '("Lorem [[id:e6c17c1a-6b05-40d2-a01f-b147633c51b1][ipsum]] dolor sit amet, consectetur adipiscing elit. Mauris eget viverra mi.
|
||||
Duis eget dui id tellus fermentum vehicula. Duis tincidunt quam vel erat
|
||||
bibendum commodo. Phasellus in justo vitae magna commodo rhoncus id quis justo.
|
||||
Morbi id malesuada nisi. Praesent ipsum velit, commodo vel bibendum vitae,
|
||||
dignissim in magna. Pellentesque vehicula enim ante, interdum laoreet dolor
|
||||
venenatis eget. Proin laoreet nulla a enim bibendum finibus. Proin mattis
|
||||
lobortis quam non eleifend. Pellentesque vitae imperdiet nisl.")
|
||||
(mapcar #'org-roam-export-backlink-excerpt (org-roam-backlinks-get (org-roam-node-from-id "e6c17c1a-6b05-40d2-a01f-b147633c51b1") :unique t)))))
|
||||
|
||||
(provide 'tests)
|
||||
;;; tests.el ends here
|
||||
|
|
Loading…
Reference in a new issue