(fix): fix fuzzy link completions (#1022)

This commit is contained in:
Jethro Kuan
2020-08-10 15:38:17 +08:00
committed by GitHub
parent 8c442a72de
commit 9753ee451f
2 changed files with 67 additions and 65 deletions

View File

@ -260,22 +260,26 @@
["801b58eb-97e2-435f-a33e-ff59a2f0c213" ,(test-org-roam--abs-path "headlines/headline.org")])))))
(describe "Test fuzzy links"
(it ""
(expect (org-roam--split-fuzzy-link "")
:to-equal
'(title "" "" nil)))
(it "title"
(expect (org-roam--split-fuzzy-link "title")
:to-equal
'("title" nil "")))
'(title "title" "" nil)))
(it "title*"
(expect (org-roam--split-fuzzy-link "title*")
:to-equal
'("title" t "")))
'(title+headline "title" "" 5)))
(it "title*headline"
(expect (org-roam--split-fuzzy-link "title*headline")
:to-equal
'("title" t "headline")))
'(title+headline "title" "headline" 5)))
(it "*headline"
(expect (org-roam--split-fuzzy-link "*headline")
:to-equal
'("" t "headline"))))
'(headline "" "headline" 0))))
;;; Tests
(xdescribe "org-roam-db-build-cache"