diff --git a/tests/data.org b/tests/data.org index b7a13cb..99875d8 100644 --- a/tests/data.org +++ b/tests/data.org @@ -81,7 +81,7 @@ SCHEDULED: <2017-07-05 Wed> If I don't, the frobnicator will probably fall off halfway to Mars... -Gotta buy one first, though. +Gotta buy one first, though. [[https://example.com/][This one]] looks suitable. * Recurring :PROPERTIES: diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index c9d560e..f273c57 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -644,7 +644,7 @@ RESULTS should be a list of strings as returned by (describe "(link)" (org-ql-it "without arguments" (org-ql-expect ('(link)) - '("/r/emacs"))) + '("Fix flux capacitor" "/r/emacs"))) (org-ql-it "with description-or-target" (org-ql-expect ('(link "emacs")) '("/r/emacs"))) @@ -656,6 +656,18 @@ RESULTS should be a list of strings as returned by '("/r/emacs"))) (org-ql-it "with :description and :target" (org-ql-expect ('(link :description "emacs" :target "reddit.com")) + '("/r/emacs"))) + (org-ql-it "with description-or-target regexp" + (org-ql-expect ('(link "em.cs" :regexp-p t)) + '("/r/emacs"))) + (org-ql-it "with :description regexp" + (org-ql-expect ('(link :description "em.cs" :regexp-p t)) + '("/r/emacs"))) + (org-ql-it "with :target regexp" + (org-ql-expect ('(link :target "em.cs" :regexp-p t)) + '("/r/emacs"))) + (org-ql-it "with :description and :target regexp" + (org-ql-expect ('(link :description "em.cs" :target "em.cs" :regexp-p t)) '("/r/emacs")))) (describe "(outline-path)"