diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 4e78f3a6..5f9463f1 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -1147,33 +1147,35 @@ with keyword arg NOW in PLIST." (before-each (setq org-ql-test-buffer (org-ql-test-data-buffer "data-links.org"))) - (org-ql-it "without arguments" - (org-ql-expect ('(link)) - '("Alpha"))) - (org-ql-it "with description-or-target" - (org-ql-expect ('(link "phrase")) - '("Alpha"))) - (org-ql-it "with :description" - (org-ql-expect ('(link :description "phrase")) - '("Alpha"))) - (org-ql-it "with :target" - (org-ql-expect ('(link :target "id:")) - '("Alpha"))) - (org-ql-it "with :description and :target" - (org-ql-expect ('(link :description "phrase" :target "id")) - '("Alpha"))) - (org-ql-it "with description-or-target regexp" - (org-ql-expect ('(link "id:.*" :regexp-p t)) - '("Alpha"))) - (org-ql-it "with :description regexp" - (org-ql-expect ('(link :description "phr.se" :regexp-p t)) - '("Alpha"))) - (org-ql-it "with :target regexp" - (org-ql-expect ('(link :target "id:.*" :regexp-p t)) - '("Alpha"))) - (org-ql-it "with :description and :target regexp" - (org-ql-expect ('(link :description "phr.se" :target "id:.*" :regexp-p t)) - '("Alpha"))))) + (unless (version< org-version "9.3") + ;; Earlier Org versions don't allow escaped brackets in descriptions. + (org-ql-it "without arguments" + (org-ql-expect ('(link)) + '("Alpha"))) + (org-ql-it "with description-or-target" + (org-ql-expect ('(link "phrase")) + '("Alpha"))) + (org-ql-it "with :description" + (org-ql-expect ('(link :description "phrase")) + '("Alpha"))) + (org-ql-it "with :target" + (org-ql-expect ('(link :target "id:")) + '("Alpha"))) + (org-ql-it "with :description and :target" + (org-ql-expect ('(link :description "phrase" :target "id")) + '("Alpha"))) + (org-ql-it "with description-or-target regexp" + (org-ql-expect ('(link "id:.*" :regexp-p t)) + '("Alpha"))) + (org-ql-it "with :description regexp" + (org-ql-expect ('(link :description "phr.se" :regexp-p t)) + '("Alpha"))) + (org-ql-it "with :target regexp" + (org-ql-expect ('(link :target "id:.*" :regexp-p t)) + '("Alpha"))) + (org-ql-it "with :description and :target regexp" + (org-ql-expect ('(link :description "phr.se" :target "id:.*" :regexp-p t)) + '("Alpha")))))) (describe "(outline-path)" (org-ql-it "with one argument"